C++ API and example¶
1. Introduction¶
This page exist in order to extract the examples from the Doxygen documentation, Please have look at the end of this page there are all the examples.
2. C++ API and example¶
-
template<typename
Policy>
classaccessor: public object_api<accessor<Policy>>, public object_api<accessor<Policy>> - #include <pytypes.h>
Public Functions
-
accessor(const accessor&) = default
-
accessor(accessor&&) = default
-
inline void
operator=(const accessor &a) &&
-
inline void
operator=(const accessor &a) &
-
template<typename
T>
inline voidoperator=(T &&value) &&
-
template<typename
T>
inline voidoperator=(T &&value) &
-
accessor(const accessor&) = default
-
accessor(accessor&&) = default
-
inline void
operator=(const accessor &a) &&
-
inline void
operator=(const accessor &a) &
-
template<typename
T>
inline voidoperator=(T &&value) &&
-
template<typename
T>
inline voidoperator=(T &&value) &
Public Members
-
template<typename T = Policy> PYBIND11_DEPRECATED("Use of obj.attr(...) as bool is deprecated in favor of pybind11::hasattr(obj, ...)") explicit operator enable_if_t< std key_type key
-
mutable object
cache
-
-
template<typename
F>
classtesting::Action - #include <gmock-actions.h>
Public Types
Public Functions
-
inline
Action()
-
template<typename
G, typename = typename std::enable_if<internal::disjunction<IsCompatibleFunctor<G>, std::is_constructible<std::function<Result()>, G>>::value>::type>
inlineAction(G &&fun)
-
inline explicit
Action(ActionInterface<F> *impl)
-
inline bool
IsDoDefault() const
-
inline Result
Perform(ArgumentTuple args) const
-
inline
Action()
-
template<typename
G, typename = typename std::enable_if<internal::disjunction<IsCompatibleFunctor<G>, std::is_constructible<std::function<Result()>, G>>::value>::type>
inlineAction(G &&fun)
-
inline explicit
Action(ActionInterface<F> *impl)
-
inline bool
IsDoDefault() const
-
inline Result
Perform(ArgumentTuple args) const
Private Types
-
using
IsCompatibleFunctor= std::is_constructible<std::function<F>, G>
-
using
IsCompatibleFunctor= std::is_constructible<std::function<F>, G>
Private Functions
-
template<typename
G>
inline voidInit(G &&g, ::std::true_type)
-
template<typename
G>
inline voidInit(G &&g, ::std::false_type)
-
template<typename
G>
inline voidInit(G &&g, ::std::true_type)
-
template<typename
G>
inline voidInit(G &&g, ::std::false_type)
Private Members
-
::std::function<F>
fun_
Friends
- friend class Action
-
inline
-
struct
testing::Action::ActionAdapter Public Functions
Public Members
-
::std::shared_ptr<ActionInterface<F>>
impl_
-
::std::shared_ptr<ActionInterface<F>>
-
template<typename
F, typenameImpl>
structActionImpl - #include <gmock-actions.h>
-
template<typename
R, typename ...Args, typenameImpl>
structtesting::internal::ActionImpl<R(Args...), Impl> : public ImplBase::type<Impl>, public ImplBase::type<Impl> - #include <gmock-actions.h>
-
template<typename
F>
classtesting::ActionInterface - #include <gmock-actions.h>
Subclassed by testing::internal::IgnoreResultAction< A >::Impl< F >, testing::internal::IgnoreResultAction< A >::Impl< F >, testing::internal::ReturnAction< R >::Impl< R_, F >, testing::internal::ReturnAction< R >::Impl< R_, F >, testing::internal::ReturnAction< R >::Impl< ByMoveWrapper< R_ >, F >, testing::internal::ReturnAction< R >::Impl< ByMoveWrapper< R_ >, F >, testing::internal::ReturnRefAction< T >::Impl< F >, testing::internal::ReturnRefAction< T >::Impl< F >, testing::internal::ReturnRefOfCopyAction< T >::Impl< F >, testing::internal::ReturnRefOfCopyAction< T >::Impl< F >, testing::PolymorphicAction< Impl >::MonomorphicImpl< F >, testing::PolymorphicAction< Impl >::MonomorphicImpl< F >
Public Types
Public Functions
-
inline
ActionInterface()
-
inline virtual
~ActionInterface()
-
virtual Result
Perform(const ArgumentTuple &args) = 0
-
inline
ActionInterface()
-
inline virtual
~ActionInterface()
-
virtual Result
Perform(const ArgumentTuple &args) = 0
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface)
-
inline
-
struct
AHashTable Public Types
-
typedef void
hasher
-
typedef void
-
template<typename ...
Args>
structalias_constructor - #include <init.h>
-
class
AllowsGenericStreaming
-
template<typename
T>
classtesting::gtest_printers_test::AllowsGenericStreamingAndImplicitConversionTemplate Public Functions
-
inline
operator bool() const
-
inline
-
template<typename
T>
classAllowsGenericStreamingTemplate
-
template<typename
T, boolValue= false>
structalways_construct_holder - #include <cast.h>
Public Static Attributes
-
static constexpr bool
value= Value
-
static constexpr bool
-
template<typename
T>
classany_container - #include <common.h>
Public Functions
-
any_container() = default
-
template<typename
It, typename = enable_if_t<is_input_iterator<It>::value>>
inlineany_container(It first, It last)
-
template<typename
Container, typename = enable_if_t<std::is_convertible<decltype(*std::begin(std::declval<const Container&>())), T>::value>>
inlineany_container(const Container &c)
-
template<typename
TIn, typename = enable_if_t<std::is_convertible<TIn, T>::value>>
inlineany_container(const std::initializer_list<TIn> &c)
-
inline
any_container(std::vector<T> &&v)
-
inline
operator std::vector<T>&&() &&
-
inline std::vector<T> &
operator*()
-
inline const std::vector<T> &
operator*() const
-
inline std::vector<T> *
operator->()
-
inline const std::vector<T> *
operator->() const
-
any_container() = default
-
template<typename
It, typename = enable_if_t<is_input_iterator<It>::value>>
inlineany_container(It first, It last)
-
template<typename
Container, typename = enable_if_t<std::is_convertible<decltype(*std::begin(std::declval<const Container&>())), T>::value>>
inlineany_container(const Container &c)
-
template<typename
TIn, typename = enable_if_t<std::is_convertible<TIn, T>::value>>
inlineany_container(const std::initializer_list<TIn> &c)
-
inline
any_container(std::vector<T> &&v)
-
inline
operator std::vector<T>&&() &&
-
inline std::vector<T> &
operator*()
-
inline const std::vector<T> &
operator*() const
-
inline std::vector<T> *
operator->()
-
inline const std::vector<T> *
operator->() const
Private Members
-
std::vector<T>
v
-
-
struct
arg - #include <cast.h>
Annotation for arguments.
Public Functions
-
inline explicit constexpr
arg(const char *name = nullptr) Constructs an argument with the name of the argument; if null or omitted, this is a positional argument.
-
inline arg &
noconvert(bool flag = true) Indicate that the type should not be converted in the type caster.
-
inline arg &
none(bool flag = true) Indicates that the argument should/shouldn’t allow None (e.g. for nullable pointer args)
-
inline explicit constexpr
arg(const char *name = nullptr) Constructs an argument with the name of the argument; if null or omitted, this is a positional argument.
-
inline arg &
noconvert(bool flag = true) Indicate that the type should not be converted in the type caster.
-
inline arg &
none(bool flag = true) Indicates that the argument should/shouldn’t allow None (e.g. for nullable pointer args)
Public Members
-
const char *
name If non-null, this is a named kwargs argument.
-
bool
flag_noconvert If set, do not allow conversion (requires a supporting type caster!)
-
bool
flag_none If set (the default), allow None to be passed to this argument.
-
inline explicit constexpr
-
struct
arg_v: public arg, public arg - #include <cast.h>
Annotation for arguments with values.
Public Functions
-
template<typename
T>
inlinearg_v(const char *name, T &&x, const char *descr = nullptr) Direct construction with name, default, and description.
-
template<typename
T>
inlinearg_v(const arg &base, T &&x, const char *descr = nullptr) Called internally when invoking
py::arg("a") = value
-
inline arg_v &
noconvert(bool flag = true) Same as
arg::noconvert(), but returns *this as arg_v&, not arg&.
-
template<typename
T>
inlinearg_v(const char *name, T &&x, const char *descr = nullptr) Direct construction with name, default, and description.
-
template<typename
T>
inlinearg_v(const arg &base, T &&x, const char *descr = nullptr) Called internally when invoking
py::arg("a") = value
Public Members
-
object
value The default value.
-
const char *
descr The (optional) description of the default value.
-
std::string
type The C++ type name of the default value (only available when compiled in debug mode)
-
template<typename
-
class
args_proxy: public handle, public handle - #include <pytypes.h>
Public Functions
-
inline explicit
args_proxy(handle h)
-
inline kwargs_proxy
operator*() const
-
inline explicit
args_proxy(handle h)
-
inline kwargs_proxy
operator*() const
-
inline explicit
-
template<typename ...
Args>
classargument_loader - #include <cast.h>
Helper class which loads arguments for C++ functions called from Python.
Public Functions
-
inline bool
load_args(function_call &call)
-
template<typename
Return, typenameGuard, typenameFunc>
inline enable_if_t<!std::is_void<Return>::value, Return>call(Func &&f) &&
-
template<typename
Return, typenameGuard, typenameFunc>
inline enable_if_t<std::is_void<Return>::value, void_type>call(Func &&f) &&
-
inline bool
load_args(function_call &call)
-
template<typename
Return, typenameGuard, typenameFunc>
inline enable_if_t<!std::is_void<Return>::value, Return>call(Func &&f) &&
-
template<typename
Return, typenameGuard, typenameFunc>
inline enable_if_t<std::is_void<Return>::value, void_type>call(Func &&f) &&
Public Static Attributes
-
static constexpr bool
has_kwargs= kwargs_pos < 0
-
static constexpr bool
has_args= args_pos < 0
-
static constexpr auto
arg_names= concat(type_descr(make_caster<Args>::name)...)
Private Types
-
using
indices= make_index_sequence<sizeof...(Args)>
-
using
argument_is_args= std::is_same<intrinsic_t<Arg>, args>
-
using
argument_is_kwargs= std::is_same<intrinsic_t<Arg>, kwargs>
-
using
indices= make_index_sequence<sizeof...(Args)>
-
using
argument_is_args= std::is_same<intrinsic_t<Arg>, args>
-
using
argument_is_kwargs= std::is_same<intrinsic_t<Arg>, kwargs>
Private Functions
-
template<size_t...
Is>
inline boolload_impl_sequence(function_call &call, index_sequence<Is...>)
-
template<typename
Return, typenameFunc, size_t...Is, typenameGuard>
inline Returncall_impl(Func &&f, index_sequence<Is...>, Guard&&) &&
-
template<size_t...
Is>
inline boolload_impl_sequence(function_call &call, index_sequence<Is...>)
Private Members
-
std::tuple<make_caster<Args>...>
argcasters
Private Static Functions
-
static inline bool
load_impl_sequence(function_call&, index_sequence<>)
-
static inline bool
load_impl_sequence(function_call&, index_sequence<>)
Private Static Attributes
-
static constexpr auto
args_pos= constexpr_first<argument_is_args, Args...>() - (int)sizeof...(Args)
-
static constexpr auto
kwargs_pos= constexpr_first<argument_is_kwargs, Args...>() - (int)sizeof...(Args)
-
static constexpr bool
args_kwargs_are_last= kwargs_pos >= -1 && args_pos >= kwargs_pos - 1
-
inline bool
-
struct
argument_record - #include <attr.h>
Internal data structure which holds metadata about a keyword argument.
Public Functions
-
inline
argument_record(const char *name, const char *descr, handle value, bool convert, bool none)
-
inline
argument_record(const char *name, const char *descr, handle value, bool convert, bool none)
Public Members
-
const char *
name Argument name.
-
const char *
descr Human-readable version of the argument value.
-
handle
value Associated Python object.
-
bool
convert True if the argument is allowed to convert when loading.
-
bool
none True if None is allowed when loading.
-
inline
-
struct
arithmetic - #include <attr.h>
Annotation to mark enums as an arithmetic type.
-
class
array: public buffer, public buffer - #include <numpy.h>
Subclassed by array_t< T, ExtraFlags >, array_t< T, ExtraFlags >, array_t< Scalar, array::forcecast|((props::row_major ? props::inner_stride :props::outer_stride)==1 ? array::c_style :(props::row_major ? props::outer_stride :props::inner_stride)==1 ? array::f_style :0)>, array_t< Scalar, array::forcecast|((props::row_major ? props::inner_stride :props::outer_stride)==1 ? array::c_style :(props::row_major ? props::outer_stride :props::inner_stride)==1 ? array::f_style :0)>
Public Types
-
enum [anonymous]
Values:
-
enumerator
c_style
-
enumerator
f_style
-
enumerator
forcecast
-
enumerator
-
enum [anonymous]
Values:
-
enumerator
c_style
-
enumerator
f_style
-
enumerator
forcecast
-
enumerator
-
using
ShapeContainer= detail::any_container<ssize_t>
-
using
StridesContainer= detail::any_container<ssize_t>
-
using
ShapeContainer= detail::any_container<ssize_t>
-
using
StridesContainer= detail::any_container<ssize_t>
Public Functions
-
inline
array()
-
inline
array(const pybind11::dtype &dt, ShapeContainer shape, StridesContainer strides, const void *ptr = nullptr, handle base = handle())
-
inline
array(const pybind11::dtype &dt, ShapeContainer shape, const void *ptr = nullptr, handle base = handle())
-
template<typename
T, typename = detail::enable_if_t<std::is_integral<T>::value && !std::is_same<bool, T>::value>>
inlinearray(const pybind11::dtype &dt, T count, const void *ptr = nullptr, handle base = handle())
-
template<typename
T>
inlinearray(ShapeContainer shape, StridesContainer strides, const T *ptr, handle base = handle())
-
template<typename
T>
inlinearray(ShapeContainer shape, const T *ptr, handle base = handle())
-
inline explicit
array(const buffer_info &info)
-
inline pybind11::dtype
dtype() const Array descriptor (dtype)
-
inline ssize_t
size() const Total number of elements.
-
inline ssize_t
itemsize() const Byte size of a single element.
-
inline ssize_t
nbytes() const Total number of bytes.
-
inline ssize_t
ndim() const Number of dimensions.
-
inline const ssize_t *
shape() const Dimensions of the array.
-
inline const ssize_t *
strides() const Strides of the array.
-
inline int
flags() const Return the NumPy array flags.
-
inline bool
writeable() const If set, the array is writeable (otherwise the buffer is read-only)
-
inline bool
owndata() const If set, the array owns the data (will be freed when the array is deleted)
-
template<typename ...
Ix>
inline const void *data(Ix... index) const Pointer to the contained data.
If index is not provided, points to the beginning of the buffer. May throw if the index would lead to out of bounds access.
-
template<typename ...
Ix>
inline void *mutable_data(Ix... index) Mutable pointer to the contained data.
If index is not provided, points to the beginning of the buffer. May throw if the index would lead to out of bounds access. May throw if the array is not writeable.
-
template<typename ...
Ix>
inline ssize_toffset_at(Ix... index) const Byte offset from beginning of the array to a given index (full or partial).
May throw if the index would lead to out of bounds access.
-
inline ssize_t
offset_at() const
-
template<typename ...
Ix>
inline ssize_tindex_at(Ix... index) const Item count from beginning of the array to a given index (full or partial).
May throw if the index would lead to out of bounds access.
-
template<typename
T, ssize_tDims= -1>
inline detail::unchecked_mutable_reference<T, Dims>mutable_unchecked() & Returns a proxy object that provides access to the array’s data without bounds or dimensionality checking.
Will throw if the array is missing the
writeableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
template<typename
T, ssize_tDims= -1>
inline detail::unchecked_reference<T, Dims>unchecked() const & Returns a proxy object that provides const access to the array’s data without bounds or dimensionality checking.
Unlike
mutable_unchecked(), this does not require that the underlying array have thewritableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
inline array
squeeze() Return a new view with all of the dimensions of length 1 removed.
-
inline void
resize(ShapeContainer new_shape, bool refcheck = true) Resize array to given shape If refcheck is true and more that one reference exist to this array then resize will succeed only if it makes a reshape, i.e.
original size doesn’t change
-
inline
array()
-
inline
array(const pybind11::dtype &dt, ShapeContainer shape, StridesContainer strides, const void *ptr = nullptr, handle base = handle())
-
inline
array(const pybind11::dtype &dt, ShapeContainer shape, const void *ptr = nullptr, handle base = handle())
-
template<typename
T, typename = detail::enable_if_t<std::is_integral<T>::value && !std::is_same<bool, T>::value>>
inlinearray(const pybind11::dtype &dt, T count, const void *ptr = nullptr, handle base = handle())
-
template<typename
T>
inlinearray(ShapeContainer shape, StridesContainer strides, const T *ptr, handle base = handle())
-
template<typename
T>
inlinearray(ShapeContainer shape, const T *ptr, handle base = handle())
-
inline explicit
array(const buffer_info &info)
-
inline pybind11::dtype
dtype() const Array descriptor (dtype)
-
inline ssize_t
size() const Total number of elements.
-
inline ssize_t
itemsize() const Byte size of a single element.
-
inline ssize_t
nbytes() const Total number of bytes.
-
inline ssize_t
ndim() const Number of dimensions.
-
inline const ssize_t *
shape() const Dimensions of the array.
-
inline const ssize_t *
strides() const Strides of the array.
-
inline int
flags() const Return the NumPy array flags.
-
inline bool
writeable() const If set, the array is writeable (otherwise the buffer is read-only)
-
inline bool
owndata() const If set, the array owns the data (will be freed when the array is deleted)
-
template<typename ...
Ix>
inline const void *data(Ix... index) const Pointer to the contained data.
If index is not provided, points to the beginning of the buffer. May throw if the index would lead to out of bounds access.
-
template<typename ...
Ix>
inline void *mutable_data(Ix... index) Mutable pointer to the contained data.
If index is not provided, points to the beginning of the buffer. May throw if the index would lead to out of bounds access. May throw if the array is not writeable.
-
template<typename ...
Ix>
inline ssize_toffset_at(Ix... index) const Byte offset from beginning of the array to a given index (full or partial).
May throw if the index would lead to out of bounds access.
-
inline ssize_t
offset_at() const
-
template<typename ...
Ix>
inline ssize_tindex_at(Ix... index) const Item count from beginning of the array to a given index (full or partial).
May throw if the index would lead to out of bounds access.
-
template<typename
T, ssize_tDims= -1>
inline detail::unchecked_mutable_reference<T, Dims>mutable_unchecked() & Returns a proxy object that provides access to the array’s data without bounds or dimensionality checking.
Will throw if the array is missing the
writeableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
template<typename
T, ssize_tDims= -1>
inline detail::unchecked_reference<T, Dims>unchecked() const & Returns a proxy object that provides const access to the array’s data without bounds or dimensionality checking.
Unlike
mutable_unchecked(), this does not require that the underlying array have thewritableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
inline array
squeeze() Return a new view with all of the dimensions of length 1 removed.
-
inline void
resize(ShapeContainer new_shape, bool refcheck = true) Resize array to given shape If refcheck is true and more that one reference exist to this array then resize will succeed only if it makes a reshape, i.e.
original size doesn’t change
Public Static Functions
Protected Functions
-
inline void
check_writeable() const¶
-
template<typename ...
Ix>
inline voidcheck_dimensions_impl(ssize_t axis, const ssize_t *shape, ssize_t i, Ix... index) const¶
-
inline void
fail_dim_check(ssize_t dim, const std::string &msg) const
-
inline void
check_writeable() const
-
template<typename ...
Ix>
inline voidcheck_dimensions(Ix... index) const
Protected Static Functions
-
static inline PyObject *
raw_array(PyObject *ptr, int ExtraFlags = 0)¶ Create array from any object always returns a new reference.
-
static inline PyObject *
raw_array(PyObject *ptr, int ExtraFlags = 0) Create array from any object always returns a new reference.
Friends
- friend struct detail::npy_format_descriptor
- friend struct detail::npy_format_descriptor
-
enum [anonymous]
-
template<typename
ArrayType, typenameValue, boolResizable, size_tSize= 0>
structarray_caster - #include <stl.h>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (ArrayType, _("List[")+value_conv::name+_< Resizable >(_(""), _("[")+_< Size >()+_("]"))+_("]"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (ArrayType, _("List[")+value_conv::name+_< Resizable >(_(""), _("[")+_< Size >()+_("]"))+_("]"))
Public Static Functions
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
Private Functions
-
template<bool
R= Resizable>
inline boolrequire_size(enable_if_t<R, size_t> size)
-
template<bool
R= Resizable>
inline boolrequire_size(enable_if_t<!R, size_t> size)
-
template<bool
R= Resizable>
inline boolrequire_size(enable_if_t<R, size_t> size)
-
template<bool
R= Resizable>
inline boolrequire_size(enable_if_t<!R, size_t> size)
-
inline bool
-
template<typename
T>
structarray_info: public array_info_scalar<T>, public array_info_scalar<T> - #include <numpy.h>
-
template<size_t
N>
structarray_info<char[N]> : public array_info_scalar<char[N]>, public array_info_scalar<char[N]> - #include <numpy.h>
-
template<size_t
N>
structarray_info<std::array<char, N>> : public array_info_scalar<std::array<char, N>>, public array_info_scalar<std::array<char, N>> - #include <numpy.h>
-
template<typename
T, size_tN>
structarray_info<std::array<T, N>> - #include <numpy.h>
Subclassed by array_info< T[N]>, array_info< T[N]>
-
template<typename
T, size_tN>
structarray_info<T[N]> : public array_info<std::array<T, N>>, public array_info<std::array<T, N>> - #include <numpy.h>
-
template<typename
T>
structarray_info_scalar - #include <numpy.h>
Subclassed by array_info< T >, array_info< T >
Public Static Functions
-
static inline void
append_extents(list&)
-
static inline void
append_extents(list&)
Public Static Attributes
-
static constexpr bool
is_array= false
-
static constexpr bool
is_empty= false
-
static constexpr auto
extents= _("")
-
static inline void
-
template<typename
T, intExtraFlags= array::forcecast>
classarray_t: public array, public array - #include <numpy.h>
Public Functions
-
inline
array_t()
-
inline
array_t(handle h, borrowed_t)
-
inline
array_t(handle h, stolen_t)
-
inline
array_t(handle h, bool is_borrowed)
-
inline
array_t(const object &o)
-
inline explicit
array_t(const buffer_info &info)
-
inline
array_t(ShapeContainer shape, StridesContainer strides, const T *ptr = nullptr, handle base = handle())
-
inline constexpr ssize_t
itemsize() const
-
template<ssize_t
Dims= -1>
inline detail::unchecked_mutable_reference<T, Dims>mutable_unchecked() & Returns a proxy object that provides access to the array’s data without bounds or dimensionality checking.
Will throw if the array is missing the
writeableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
template<ssize_t
Dims= -1>
inline detail::unchecked_reference<T, Dims>unchecked() const & Returns a proxy object that provides const access to the array’s data without bounds or dimensionality checking.
Unlike
unchecked(), this does not require that the underlying array have thewritableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
inline
array_t()
-
inline
array_t(handle h, borrowed_t)
-
inline
array_t(handle h, stolen_t)
-
inline
array_t(handle h, bool is_borrowed)
-
inline
array_t(const object &o)
-
inline explicit
array_t(const buffer_info &info)
-
inline
array_t(ShapeContainer shape, StridesContainer strides, const T *ptr = nullptr, handle base = handle())
-
inline constexpr ssize_t
itemsize() const
-
template<ssize_t
Dims= -1>
inline detail::unchecked_mutable_reference<T, Dims>mutable_unchecked() & Returns a proxy object that provides access to the array’s data without bounds or dimensionality checking.
Will throw if the array is missing the
writeableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
-
template<ssize_t
Dims= -1>
inline detail::unchecked_reference<T, Dims>unchecked() const & Returns a proxy object that provides const access to the array’s data without bounds or dimensionality checking.
Unlike
unchecked(), this does not require that the underlying array have thewritableflag. Use with care: the array must not be destroyed or reshaped for the duration of the returned object, and the caller must take care not to access invalid dimensions or dimension indices.
Public Static Functions
-
static inline array_t
ensure(handle h) Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert it).
In case of an error, nullptr is returned and the Python error is cleared.
-
static inline bool
check_(handle h)
-
static inline array_t
ensure(handle h) Ensure that the argument is a NumPy array of the correct dtype (and if not, try to convert it).
In case of an error, nullptr is returned and the Python error is cleared.
-
static inline bool
check_(handle h)
Protected Static Functions
-
static inline PyObject *
raw_array_t(PyObject *ptr)¶ Create array from any object always returns a new reference.
-
static inline PyObject *
raw_array_t(PyObject *ptr) Create array from any object always returns a new reference.
Private Functions
-
inline
array_t(private_ctor, ShapeContainer &&shape, StridesContainer &&strides, const T *ptr, handle base)
-
inline
array_t(private_ctor, ShapeContainer &&shape, StridesContainer &&strides, const T *ptr, handle base)
-
inline
-
template<typename
T>
structarrow_proxy - #include <pytypes.h>
Quick proxy class needed to implement
operator->for iterators which can’t return pointers.Public Functions
-
inline
arrow_proxy(T &&value)
-
inline T *
operator->() const
-
inline
arrow_proxy(T &&value)
-
inline T *
operator->() const
Public Members
-
T
value
-
inline
-
class
testing::internal::AssertHelper - #include <gtest.h>
Public Functions
-
AssertHelper(TestPartResult::Type type, const char *file, int line, const char *message)
-
~AssertHelper()
-
void
operator=(const Message &message) const
-
AssertHelper(TestPartResult::Type type, const char *file, int line, const char *message)
-
~AssertHelper()
-
void
operator=(const Message &message) const
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelper)
Private Members
-
AssertHelperData *const
data_
-
-
struct
testing::internal::AssertHelper::AssertHelperData Public Functions
-
inline
AssertHelperData(TestPartResult::Type t, const char *srcfile, int line_num, const char *msg)
-
inline
AssertHelperData(TestPartResult::Type t, const char *srcfile, int line_num, const char *msg)
Public Members
-
TestPartResult::Type const
type
-
const char *const
file
-
int const
line
-
std::string const
message
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(AssertHelperData)
-
inline
-
class
AssertionResult
-
template<typename
T1, typenameT2>
classtesting::internal::AssignAction - #include <gmock-actions.h>
Public Functions
-
template<typename
Result, typenameArgumentTuple>
inline voidPerform(const ArgumentTuple&) const
-
template<typename
Result, typenameArgumentTuple>
inline voidPerform(const ArgumentTuple&) const
-
template<typename
-
class
BarEnvironment: public testing::Environment Public Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline virtual void
-
class
testing::internal::Base Public Functions
-
inline
Base()
-
inline explicit
Base(int n)
-
Base(const Base&) = default
-
inline virtual
~Base()
-
inline int
member()
Private Members
-
int
member_
-
inline
-
class
Base Public Functions
-
inline explicit
Base(int an_x)
-
inline int
x() const
Private Members
-
int
x_
-
inline explicit
-
template<typename
T>
structbase - #include <attr.h>
Annotation indicating that a class derives from another given type.
Public Functions
-
inline
base()
-
inline
base()
-
inline
-
struct
testing::gtest_printers_test::Big Public Functions
-
inline
Big()
Public Members
-
char
array[257]
-
inline
-
class
BiggestIntConvertible Public Functions
-
inline
operator ::testing::internal::BiggestInt() const
-
inline
-
struct
Bool Public Functions
-
inline explicit
Bool(int val)
-
inline bool
operator>(int n) const
-
inline bool
operator==(const Bool &rhs) const
Public Members
-
bool
value
-
inline explicit
-
class
bool_: public object, public object - #include <pytypes.h>
Public Functions
-
inline
bool_()
-
inline
bool_(bool value)
-
inline
operator bool() const
-
inline
bool_()
-
inline
bool_(bool value)
-
inline
operator bool() const
Private Static Functions
-
static inline PyObject *
raw_bool(PyObject *op) Return the truth value of an object always returns a new reference.
-
static inline PyObject *
raw_bool(PyObject *op) Return the truth value of an object always returns a new reference.
-
inline
-
class
testing::gmock_more_actions_test::BoolResetter Public Functions
-
inline explicit
BoolResetter(bool *value)
-
inline
~BoolResetter()
Private Members
-
bool *
value_
-
inline explicit
-
template<bool...>
structbools - #include <common.h>
Compile-time all/any/none of that check the boolean value of all template types.
-
struct
borrowed_t - #include <pytypes.h>
-
class
testing::internal::BriefUnitTestResultPrinter: public testing::TestEventListener Public Functions
-
inline
BriefUnitTestResultPrinter()
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
inline virtual void
OnTestIterationStart(const UnitTest&, int) override
-
inline virtual void
OnEnvironmentsSetUpStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsSetUpEnd(const UnitTest&) override
-
inline virtual void
OnTestCaseStart(const TestCase&) override
-
inline virtual void
OnTestStart(const TestInfo&) override
-
virtual void
OnTestPartResult(const TestPartResult &result) override
-
virtual void
OnTestEnd(const TestInfo &test_info) override
-
inline virtual void
OnTestCaseEnd(const TestCase&) override
-
inline virtual void
OnEnvironmentsTearDownStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsTearDownEnd(const UnitTest&) override
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
Public Static Functions
-
static inline void
PrintTestName(const char *test_suite, const char *test)
-
inline
-
class
buffer: public object, public object - #include <pytypes.h>
Public Functions
-
inline buffer_info
request(bool writable = false) const
-
inline buffer_info
request(bool writable = false) const
-
inline buffer_info
-
struct
buffer_info - #include <buffer_info.h>
Information record describing a Python buffer object.
Public Functions
-
inline
buffer_info()
-
inline
buffer_info(void *ptr, ssize_t itemsize, const std::string &format, ssize_t ndim, detail::any_container<ssize_t> shape_in, detail::any_container<ssize_t> strides_in, bool readonly = false)
-
template<typename
T>
inlinebuffer_info(T *ptr, detail::any_container<ssize_t> shape_in, detail::any_container<ssize_t> strides_in, bool readonly = false)
-
inline
buffer_info(void *ptr, ssize_t itemsize, const std::string &format, ssize_t size, bool readonly = false)
-
inline explicit
buffer_info(Py_buffer *view, bool ownview = true)
-
buffer_info(const buffer_info&) = delete
-
buffer_info &
operator=(const buffer_info&) = delete
-
inline
buffer_info(buffer_info &&other)
-
inline buffer_info &
operator=(buffer_info &&rhs)
-
inline
~buffer_info()
-
inline
buffer_info()
-
inline
buffer_info(void *ptr, ssize_t itemsize, const std::string &format, ssize_t ndim, detail::any_container<ssize_t> shape_in, detail::any_container<ssize_t> strides_in, bool readonly = false)
-
template<typename
T>
inlinebuffer_info(T *ptr, detail::any_container<ssize_t> shape_in, detail::any_container<ssize_t> strides_in, bool readonly = false)
-
inline
buffer_info(void *ptr, ssize_t itemsize, const std::string &format, ssize_t size, bool readonly = false)
-
inline explicit
buffer_info(Py_buffer *view, bool ownview = true)
-
buffer_info(const buffer_info&) = delete
-
buffer_info &
operator=(const buffer_info&) = delete
-
inline
buffer_info(buffer_info &&other)
-
inline buffer_info &
operator=(buffer_info &&rhs)
-
inline
~buffer_info()
Public Members
-
void *
ptr= nullptr
-
ssize_t
itemsize= 0
-
ssize_t
size= 0
-
std::string
format
-
ssize_t
ndim= 0
-
std::vector<ssize_t>
shape
-
std::vector<ssize_t>
strides
-
bool
readonly= false
Private Functions
-
inline
buffer_info(private_ctr_tag, void *ptr, ssize_t itemsize, const std::string &format, ssize_t ndim, detail::any_container<ssize_t> &&shape_in, detail::any_container<ssize_t> &&strides_in, bool readonly)
-
inline
buffer_info(private_ctr_tag, void *ptr, ssize_t itemsize, const std::string &format, ssize_t ndim, detail::any_container<ssize_t> &&shape_in, detail::any_container<ssize_t> &&strides_in, bool readonly)
Private Members
-
Py_buffer *
view= nullptr
-
bool
ownview= false
-
inline
-
struct
buffer_protocol - #include <attr.h>
Annotation which enables the buffer protocol for a type.
-
class
builtin_exception: public runtime_error, public runtime_error - #include <common.h>
C++ bindings of builtin Python exceptions.
Public Functions
-
virtual void
set_error() const = 0 Set the error using the Python C API.
-
virtual void
set_error() const = 0 Set the error using the Python C API.
-
virtual void
-
template<typename
T>
classtesting::internal::BuiltInDefaultValue<const T> - #include <gmock-actions.h>
-
template<typename
T, boolkDefaultConstructible>
structtesting::internal::BuiltInDefaultValueGetter - #include <gmock-actions.h>
-
template<typename
T>
structtesting::internal::BuiltInDefaultValueGetter<T, false> - #include <gmock-actions.h>
-
template<typename
T>
structtesting::internal::ByMoveWrapper - #include <gmock-actions.h>
Public Members
-
T
payload
-
T
-
class
bytes: public object, public object - #include <pytypes.h>
Public Functions
-
inline
bytes(const char *c = "")
-
inline
bytes(const char *c, size_t n)
-
inline
bytes(const std::string &s)
-
inline explicit
bytes(const pybind11::str &s)
-
inline
operator std::string() const
-
inline
bytes(const char *c = "")
-
inline
bytes(const char *c, size_t n)
-
inline
bytes(const std::string &s)
-
explicit
bytes(const pybind11::str &s)
-
inline
operator std::string() const
-
inline
-
template<typename ...
Ts>
structcall_guard - #include <attr.h>
A call policy which places one or more guard variables (
Ts...) around the function call.For example, this definition:
.. code-block:: cpp
m.def("foo", foo, py::call_guard<T>());
is equivalent to the following pseudocode:
.. code-block:: cpp
m.def("foo", [](args...) { T scope_guard; return foo(args...); // forwarded arguments });
-
template<typename
T>
structcall_guard<T> - #include <attr.h>
-
template<>
structcall_guard<> - #include <attr.h>
Public Types
-
using
type= detail::void_type
-
using
type= detail::void_type
-
using
-
class
testing::gmock_nice_strict_test::CallsMockMethodInDestructor Public Functions
-
inline
~CallsMockMethodInDestructor()
-
MOCK_METHOD (void, OnDestroy,())
-
inline
-
class
capsule: public object, public object - #include <pytypes.h>
Public Functions
-
PYBIND11_DEPRECATED ("Use reinterpret_borrow<capsule>() or reinterpret_steal<capsule>()") capsule(PyObject *ptr
-
PYBIND11_DEPRECATED ("Use reinterpret_borrow<capsule>() or reinterpret_steal<capsule>()") capsule(PyObject *ptr
Public Members
-
bool
is_borrowed
-
-
class
testing::internal::Castable Public Functions
-
inline explicit
Castable(bool *converted)
-
inline
operator Base()
Private Members
-
bool *
converted_
-
inline explicit
-
class
ChildClassWithoutStreamOperator: public ParentClass
-
class
ChildClassWithStreamOperator: public ParentClass
-
template<typename
type_, typename ...options>
classclass_: public generic_type, public generic_type - #include <pybind11.h>
Public Types
-
using
type= type_
-
using
type_alias= detail::exactly_one_t<is_subtype, void, options...>
-
using
type= type_
-
using
type_alias= detail::exactly_one_t<is_subtype, void, options...>
Public Functions
-
template<typename
Func, typename ...Extra>
inline class_ &def(const char *name_, Func &&f, const Extra&... extra)
-
template<typename
Func, typename ...Extra>
inline class_ &def_static(const char *name_, Func &&f, const Extra&... extra)
-
template<detail::op_id
id, detail::op_typeot, typenameL, typenameR, typename ...Extra>
inline class_ &def(const detail::op_<id, ot, L, R> &op, const Extra&... extra)
-
template<detail::op_id
id, detail::op_typeot, typenameL, typenameR, typename ...Extra>
inline class_ &def_cast(const detail::op_<id, ot, L, R> &op, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(const detail::initimpl::constructor<Args...> &init, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(const detail::initimpl::alias_constructor<Args...> &init, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(detail::initimpl::factory<Args...> &&init, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(detail::initimpl::pickle_factory<Args...> &&pf, const Extra&... extra)
-
template<typename
Return, typenameClass, typename ...Args>
inline class_ &def_buffer(Return (Class::* func)(Args...))
-
template<typename
Return, typenameClass, typename ...Args>
inline class_ &def_buffer(Return (Class::* func)(Args...) const)
-
template<typename
C, typenameD, typename ...Extra>
inline class_ &def_readwrite(const char *name, D C::* pm, const Extra&... extra)
-
template<typename
C, typenameD, typename ...Extra>
inline class_ &def_readonly(const char *name, const D C::* pm, const Extra&... extra)
-
template<typename
D, typename ...Extra>
inline class_ &def_readwrite_static(const char *name, D *pm, const Extra&... extra)
-
template<typename
D, typename ...Extra>
inline class_ &def_readonly_static(const char *name, const D *pm, const Extra&... extra)
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property_readonly(const char *name, const Getter &fget, const Extra&... extra) Uses return_value_policy::reference_internal by default.
-
template<typename ...
Extra>
inline class_ &def_property_readonly(const char *name, const cpp_function &fget, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property_readonly_static(const char *name, const Getter &fget, const Extra&... extra) Uses return_value_policy::reference by default.
-
template<typename ...
Extra>
inline class_ &def_property_readonly_static(const char *name, const cpp_function &fget, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Getter, typenameSetter, typename ...Extra>
inline class_ &def_property(const char *name, const Getter &fget, const Setter &fset, const Extra&... extra) Uses return_value_policy::reference_internal by default.
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property(const char *name, const Getter &fget, const cpp_function &fset, const Extra&... extra)
-
template<typename ...
Extra>
inline class_ &def_property(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property_static(const char *name, const Getter &fget, const cpp_function &fset, const Extra&... extra) Uses return_value_policy::reference by default.
-
template<typename ...
Extra>
inline class_ &def_property_static(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Func, typename ...Extra>
inline class_ &def(const char *name_, Func &&f, const Extra&... extra)
-
template<typename
Func, typename ...Extra>
inline class_ &def_static(const char *name_, Func &&f, const Extra&... extra)
-
template<detail::op_id
id, detail::op_typeot, typenameL, typenameR, typename ...Extra>
inline class_ &def(const detail::op_<id, ot, L, R> &op, const Extra&... extra)
-
template<detail::op_id
id, detail::op_typeot, typenameL, typenameR, typename ...Extra>
inline class_ &def_cast(const detail::op_<id, ot, L, R> &op, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(const detail::initimpl::constructor<Args...> &init, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(const detail::initimpl::alias_constructor<Args...> &init, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(detail::initimpl::factory<Args...> &&init, const Extra&... extra)
-
template<typename ...
Args, typename ...Extra>
inline class_ &def(detail::initimpl::pickle_factory<Args...> &&pf, const Extra&... extra)
-
template<typename
Return, typenameClass, typename ...Args>
inline class_ &def_buffer(Return (Class::* func)(Args...))
-
template<typename
Return, typenameClass, typename ...Args>
inline class_ &def_buffer(Return (Class::* func)(Args...) const)
-
template<typename
C, typenameD, typename ...Extra>
inline class_ &def_readwrite(const char *name, D C::* pm, const Extra&... extra)
-
template<typename
C, typenameD, typename ...Extra>
inline class_ &def_readonly(const char *name, const D C::* pm, const Extra&... extra)
-
template<typename
D, typename ...Extra>
inline class_ &def_readwrite_static(const char *name, D *pm, const Extra&... extra)
-
template<typename
D, typename ...Extra>
inline class_ &def_readonly_static(const char *name, const D *pm, const Extra&... extra)
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property_readonly(const char *name, const Getter &fget, const Extra&... extra) Uses return_value_policy::reference_internal by default.
-
template<typename ...
Extra>
inline class_ &def_property_readonly(const char *name, const cpp_function &fget, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property_readonly_static(const char *name, const Getter &fget, const Extra&... extra) Uses return_value_policy::reference by default.
-
template<typename ...
Extra>
inline class_ &def_property_readonly_static(const char *name, const cpp_function &fget, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Getter, typenameSetter, typename ...Extra>
inline class_ &def_property(const char *name, const Getter &fget, const Setter &fset, const Extra&... extra) Uses return_value_policy::reference_internal by default.
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property(const char *name, const Getter &fget, const cpp_function &fset, const Extra&... extra)
-
template<typename ...
Extra>
inline class_ &def_property(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
-
template<typename
Getter, typename ...Extra>
inline class_ &def_property_static(const char *name, const Getter &fget, const cpp_function &fset, const Extra&... extra) Uses return_value_policy::reference by default.
-
template<typename ...
Extra>
inline class_ &def_property_static(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra&... extra) Uses cpp_function’s return_value_policy by default.
Public Static Functions
-
template<typename
Base, detail::enable_if_t<is_base<Base>::value, int> = 0>
static inline voidadd_base(detail::type_record &rec)
-
template<typename
Base, detail::enable_if_t<!is_base<Base>::value, int> = 0>
static inline voidadd_base(detail::type_record&)
Public Static Attributes
-
static constexpr bool
has_alias= !std::is_void<type_alias>::value
Private Types
-
using
is_holder= detail::is_holder_type<type_, T>
-
using
is_subtype= detail::is_strict_base_of<type_, T>
-
using
is_base= detail::is_strict_base_of<T, type_>
-
using
is_holder= detail::is_holder_type<type_, T>
-
using
is_subtype= detail::is_strict_base_of<type_, T>
-
using
is_base= detail::is_strict_base_of<T, type_>
Private Static Functions
Initialize holder object, variant 1: object derives from enable_shared_from_this.
-
static inline void
init_holder_from_existing(const detail::value_and_holder &v_h, const holder_type *holder_ptr, std::true_type)
-
static inline void
init_holder_from_existing(const detail::value_and_holder &v_h, const holder_type *holder_ptr, std::false_type)
-
static inline void
init_holder(detail::instance *inst, detail::value_and_holder &v_h, const holder_type *holder_ptr, const void*) Initialize holder object, variant 2: try to construct from existing holder object, if possible.
-
static inline void
init_instance(detail::instance *inst, const void *holder_ptr) Performs instance initialization including constructing a holder and registering the known instance.
Should be called as soon as the
typevalue_ptr is set for an instance. Takes an optional pointer to an existing holder to use; if not specified and the instance is.owned, a new holder will be constructed to manage the value pointer.
-
static inline void
dealloc(detail::value_and_holder &v_h) Deallocates an instance; via holder, if constructed; otherwise via operator delete.
-
static inline detail::function_record *
get_function_record(handle h)
-
template<typename
T>
static inline voidinit_holder(detail::instance *inst, detail::value_and_holder &v_h, const holder_type*, const std::enable_shared_from_this<T>*) Initialize holder object, variant 1: object derives from enable_shared_from_this.
-
static inline void
init_holder_from_existing(const detail::value_and_holder &v_h, const holder_type *holder_ptr, std::true_type)
-
static inline void
init_holder_from_existing(const detail::value_and_holder &v_h, const holder_type *holder_ptr, std::false_type)
-
static inline void
init_holder(detail::instance *inst, detail::value_and_holder &v_h, const holder_type *holder_ptr, const void*) Initialize holder object, variant 2: try to construct from existing holder object, if possible.
-
static inline void
init_instance(detail::instance *inst, const void *holder_ptr) Performs instance initialization including constructing a holder and registering the known instance.
Should be called as soon as the
typevalue_ptr is set for an instance. Takes an optional pointer to an existing holder to use; if not specified and the instance is.owned, a new holder will be constructed to manage the value pointer.
-
static inline void
dealloc(detail::value_and_holder &v_h) Deallocates an instance; via holder, if constructed; otherwise via operator delete.
-
static inline detail::function_record *
get_function_record(handle h)
-
using
-
class
CodeLocationForTESTP: public testing::TestWithParam<int>
-
class
CommentTest: public TestWithParam<Unstreamable>
-
class
common_iterator - #include <numpy.h>
Public Types
-
using
container_type= std::vector<ssize_t>
-
using
value_type= container_type::value_type
-
using
size_type= container_type::size_type
-
using
container_type= std::vector<ssize_t>
-
using
value_type= container_type::value_type
-
using
size_type= container_type::size_type
Public Functions
-
inline
common_iterator()
-
inline
common_iterator(void *ptr, const container_type &strides, const container_type &shape)
-
inline void
increment(size_type dim)
-
inline void *
data() const
-
inline
common_iterator()
-
inline
common_iterator(void *ptr, const container_type &strides, const container_type &shape)
-
inline void
increment(size_type dim)
-
inline void *
data() const
-
using
-
template<typename
T>
classCommonTest: public testing::Test Subclassed by DerivedTest< T >
Public Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
Protected Functions
-
inline
CommonTest()
-
inline
~CommonTest() override
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Attributes
-
T
value_
Protected Static Attributes
-
static inline void
-
template<typename
T, typenameSFINAE= void>
structcompare_buffer_info - #include <buffer_info.h>
Public Static Functions
-
static inline bool
compare(const buffer_info &b)
-
static inline bool
compare(const buffer_info &b)
-
static inline bool
-
template<typename
T>
structcompare_buffer_info<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> - #include <numpy.h>
Public Static Functions
-
static inline bool
compare(const buffer_info &b)
-
static inline bool
compare(const buffer_info &b)
-
static inline bool
-
template<typename
T>
structcompare_buffer_info<T, detail::enable_if_t<std::is_integral<T>::value>> - #include <buffer_info.h>
Public Static Functions
-
static inline bool
compare(const buffer_info &b)
-
static inline bool
compare(const buffer_info &b)
-
static inline bool
-
struct
testing::gtest_printers_test::const_iterator Public Members
-
char
x
-
char
-
struct
ConstOnlyContainerWithClassIterator::const_iterator
-
class
testing::internal::ConstAndNonConstCastable Public Functions
-
inline
ConstAndNonConstCastable(bool *converted, bool *const_converted)
-
inline
operator Base()
-
inline
operator Base() const
Private Members
-
bool *
converted_
-
bool *
const_converted_
-
inline
-
class
testing::internal::ConstCastable Public Functions
-
inline explicit
ConstCastable(bool *converted)
-
inline
operator Base() const
Private Members
-
bool *
converted_
-
inline explicit
-
struct
ConstOnlyContainerWithClassIterator
-
struct
ConstOnlyContainerWithPointerIterator Public Types
-
using
const_iterator= int*
-
using
-
struct
ConstructionCounting Public Functions
-
inline
ConstructionCounting()
-
inline
~ConstructionCounting()
-
inline
ConstructionCounting(const ConstructionCounting&)
-
inline
ConstructionCounting(ConstructionCounting&&) noexcept
-
inline ConstructionCounting &
operator=(const ConstructionCounting&)
-
inline ConstructionCounting &
operator=(ConstructionCounting&&) noexcept
Public Static Functions
-
static inline void
Reset()
Public Static Attributes
-
static int
default_ctor_calls= 0
-
static int
dtor_calls= 0
-
static int
copy_ctor_calls= 0
-
static int
move_ctor_calls= 0
-
static int
copy_assignment_calls= 0
-
static int
move_assignment_calls= 0
-
inline
-
template<typename ...
Args>
structconstructor - #include <init.h>
Public Static Functions
-
template<typename
Class, typename ...Extra, enable_if_t<!Class::has_alias, int> = 0>
static inline voidexecute(Class &cl, const Extra&... extra)
-
template<typename
Class, typename ...Extra, enable_if_t<Class::has_alias && std::is_constructible<Cpp<Class>, Args...>::value, int> = 0>
static inline voidexecute(Class &cl, const Extra&... extra)
-
template<typename
Class, typename ...Extra, enable_if_t<Class::has_alias && !std::is_constructible<Cpp<Class>, Args...>::value, int> = 0>
static inline voidexecute(Class &cl, const Extra&... extra)
-
template<typename
Class, typename ...Extra, enable_if_t<!Class::has_alias, int> = 0>
static inline voidexecute(Class &cl, const Extra&... extra)
-
template<typename
-
template<typename
T>
structcontainer_traits - #include <stl_bind.h>
Public Static Functions
-
template<typename
T2>
static std::true_typetest_comparable(decltype(std::declval<const T2&>() == std::declval<const T2&>())*)
-
template<typename
T2>
static std::false_typetest_comparable(...)
-
template<typename
T2>
static std::true_typetest_value(typename T2::value_type*)
-
template<typename
T2>
static std::false_typetest_value(...)
-
template<typename
T2>
static std::true_typetest_pair(typename T2::first_type*, typename T2::second_type*)
-
template<typename
T2>
static std::false_typetest_pair(...)
-
template<typename
T2>
static std::true_typetest_comparable(decltype(std::declval<const T2&>() == std::declval<const T2&>())*)
-
template<typename
T2>
static std::false_typetest_comparable(...)
-
template<typename
T2>
static std::true_typetest_value(typename T2::value_type*)
-
template<typename
T2>
static std::false_typetest_value(...)
-
template<typename
T2>
static std::true_typetest_pair(typename T2::first_type*, typename T2::second_type*)
-
template<typename
T2>
static std::false_typetest_pair(...)
Public Static Attributes
-
static constexpr const bool
is_comparable= std::is_same<std::true_type, decltype(test_comparable<T>(nullptr))>::value
-
static constexpr const bool
is_pair= std::is_same<std::true_type, decltype(test_pair<T>(nullptr, nullptr))>::value
-
static constexpr const bool
is_vector= std::is_same<std::true_type, decltype(test_value<T>(nullptr))>::value
-
template<typename
-
struct
testing::internal::ContainerPrinter - #include <gtest-printers.h>
Public Static Functions
-
template<typename T, typename = typename std::enable_if< (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) && !IsRecursiveContainer<T>::value>::type> static inline void PrintValue (const T &container, std::ostream *os)
-
template<typename T, typename = typename std::enable_if< (sizeof(IsContainerTest<T>(0)) == sizeof(IsContainer)) && !IsRecursiveContainer<T>::value>::type> static inline void PrintValue (const T &container, std::ostream *os)
-
-
class
ConversionHelperBase Subclassed by ConversionHelperDerived
-
class
ConversionHelperDerived: public ConversionHelperBase
-
template<class
Scalar, intRows, intCols, intAlign, intRowsAtCompileTime, intColsAtCompileTime>
structYAML::convert<Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>> - #include <yaml_eigen.hpp>
Public Types
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
Eigen_Type_
-
typedef std::conditional<is_vector_type_, EigenVectorConverter<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>, EigenMatrixConverter<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>>::type
Converter_
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
Eigen_Type_
-
typedef std::conditional<is_vector_type_, EigenVectorConverter<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>, EigenMatrixConverter<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>>::type
Converter_
Public Static Functions
-
static inline Node
encode(const Eigen_Type_ &rhs)
-
static inline bool
decode_2d(const Node &node, Eigen_Type_ &rhs)
-
static inline bool
decode_1d(const Node &node, Eigen_Type_ &rhs)
-
static inline bool
decode(const Node &node, Eigen_Type_ &rhs)
-
static inline Node
encode(const Eigen_Type_ &rhs)
-
static inline bool
decode_2d(const Node &node, Eigen_Type_ &rhs)
-
static inline bool
decode_1d(const Node &node, Eigen_Type_ &rhs)
-
static inline bool
decode(const Node &node, Eigen_Type_ &rhs)
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
-
template<>
structYAML::convert<Eigen::Quaterniond> - #include <yaml_eigen.hpp>
Public Static Functions
-
static inline Node
encode(const Eigen::Quaterniond &mp)
-
static inline bool
decode(const Node &node, Eigen::Quaterniond &mp)
-
static inline Node
encode(const Eigen::Quaterniond &mp)
-
static inline bool
decode(const Node &node, Eigen::Quaterniond &mp)
-
static inline Node
-
template<class
T>
structYAML::convert<robot_math::MovableEigenVector<T>> - #include <yaml_eigen.hpp>
Public Static Functions
-
static inline Node
encode(const robot_math::MovableEigenVector<T> &mp)
-
static inline bool
decode(const Node &node, robot_math::MovableEigenVector<T> &mp)
-
static inline Node
encode(const robot_math::MovableEigenVector<T> &mp)
-
static inline bool
decode(const Node &node, robot_math::MovableEigenVector<T> &mp)
-
static inline Node
-
struct
ConvertibleToAssertionResult Public Functions
-
inline
operator AssertionResult() const
-
inline
-
struct
ConvertibleToStringViewPrinter - #include <gtest-printers.h>
-
template<typename
type, typenameholder_type>
structcopyable_holder_caster: public type_caster_base<type>, public type_caster_base<type> - #include <cast.h>
Type caster for holder types like std::shared_ptr, etc.
Public Functions
-
inline bool
load(handle src, bool convert)
-
inline explicit
operator type*()
-
inline explicit
operator type&()
-
inline explicit
operator holder_type*()
-
inline explicit
operator holder_type&()
-
inline bool
load(handle src, bool convert)
-
inline explicit
operator type*()
-
inline explicit
operator type&()
-
inline explicit
operator holder_type*()
-
inline explicit
operator holder_type&()
Public Static Functions
-
static inline handle
cast(const holder_type &src, return_value_policy, handle)
-
static inline handle
cast(const holder_type &src, return_value_policy, handle)
Protected Functions
-
inline void
check_holder_compat()¶
-
inline bool
load_value(value_and_holder &&v_h)¶
-
template<typename
T= holder_type, detail::enable_if_t<!std::is_constructible<T, const T&, type*>::value, int> = 0>
inline booltry_implicit_casts(handle, bool)¶
-
template<typename
T= holder_type, detail::enable_if_t<std::is_constructible<T, const T&, type*>::value, int> = 0>
inline booltry_implicit_casts(handle src, bool convert)¶
-
inline void
check_holder_compat()
-
inline bool
load_value(value_and_holder &&v_h)
-
template<typename
T= holder_type, detail::enable_if_t<!std::is_constructible<T, const T&, type*>::value, int> = 0>
inline booltry_implicit_casts(handle, bool)
-
template<typename
T= holder_type, detail::enable_if_t<std::is_constructible<T, const T&, type*>::value, int> = 0>
inline booltry_implicit_casts(handle src, bool convert)
Protected Attributes
-
holder_type
holder¶
Protected Static Functions
-
static inline bool
try_direct_conversions(handle)
Friends
- friend class type_caster_generic
-
inline bool
-
class
Counter - #include <sample4.h>
Public Functions
-
inline
Counter()
-
int
Increment()
-
int
Decrement()
-
void
Print() const
Private Members
-
int
counter_
-
inline
-
class
cpp_function: public function, public function - #include <pybind11.h>
Wraps an arbitrary C++ function/method/lambda function/.. into a callable Python object.
Public Functions
-
inline
cpp_function()
-
inline
cpp_function(std::nullptr_t)
-
template<typename
Return, typename ...Args, typename ...Extra>
inlinecpp_function(Return (*f)(Args...), const Extra&... extra, ) Construct a cpp_function from a vanilla function pointer.
-
template<typename
Func, typename ...Extra, typename = detail::enable_if_t<detail::is_lambda<Func>::value>>
inlinecpp_function(Func &&f, const Extra&... extra) Construct a cpp_function from a lambda function (possibly with internal state)
-
template<typename
Return, typenameClass, typename ...Arg, typename ...Extra>
inlinecpp_function(Return (Class::* f)(Arg...), const Extra&... extra, ) Construct a cpp_function from a class method (non-const)
-
template<typename
Return, typenameClass, typename ...Arg, typename ...Extra>
inlinecpp_function(Return (Class::* f)(Arg...) const, const Extra&... extra, ) Construct a cpp_function from a class method (const)
-
inline object
name() const Return the function name.
-
inline
cpp_function()
-
inline
cpp_function(std::nullptr_t)
-
template<typename
Return, typename ...Args, typename ...Extra>
inlinecpp_function(Return (*f)(Args...), const Extra&... extra, ) Construct a cpp_function from a vanilla function pointer.
-
template<typename
Func, typename ...Extra, typename = detail::enable_if_t<detail::is_lambda<Func>::value>>
inlinecpp_function(Func &&f, const Extra&... extra) Construct a cpp_function from a lambda function (possibly with internal state)
-
template<typename
Return, typenameClass, typename ...Arg, typename ...Extra>
inlinecpp_function(Return (Class::* f)(Arg...), const Extra&... extra, ) Construct a cpp_function from a class method (non-const)
-
template<typename
Return, typenameClass, typename ...Arg, typename ...Extra>
inlinecpp_function(Return (Class::* f)(Arg...) const, const Extra&... extra, ) Construct a cpp_function from a class method (const)
-
inline object
name() const Return the function name.
Protected Functions
-
inline PYBIND11_NOINLINE detail::function_record * make_function_record () Space optimization: don’t inline this frequently instantiated fragment.
-
template<typename
Func, typenameReturn, typename ...Args, typename ...Extra>
inline voidinitialize(Func &&f, Return (*)(Args...), const Extra&... extra, )¶ Special internal constructor for functors, lambda functions, etc.
-
inline void
initialize_generic(detail::function_record *rec, const char *text, const std::type_info *const *types, size_t args)¶ Register a function call with Python (generic non-templated code goes here)
-
inline PYBIND11_NOINLINE detail::function_record * make_function_record () Space optimization: don’t inline this frequently instantiated fragment.
-
template<typename
Func, typenameReturn, typename ...Args, typename ...Extra>
inline voidinitialize(Func &&f, Return (*)(Args...), const Extra&... extra, ) Special internal constructor for functors, lambda functions, etc.
-
inline void
initialize_generic(detail::function_record *rec, const char *text, const std::type_info *const *types, size_t args) Register a function call with Python (generic non-templated code goes here)
Protected Static Functions
-
static inline void
destruct(detail::function_record *rec)¶ When a cpp_function is GCed, release any memory allocated by pybind11.
-
static inline PyObject *
dispatcher(PyObject *self, PyObject *args_in, PyObject *kwargs_in)¶ Main dispatch logic for calls to functions bound using pybind11.
-
static inline void
destruct(detail::function_record *rec) When a cpp_function is GCed, release any memory allocated by pybind11.
-
static inline PyObject *
dispatcher(PyObject *self, PyObject *args_in, PyObject *kwargs_in) Main dispatch logic for calls to functions bound using pybind11.
-
inline
-
class
testing::CurrentTestInfoTest: public testing::Test Protected Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
-
static inline void
-
class
CustomFunctionNamingTest: public testing::TestWithParam<std::string>
-
class
CustomFunctorNamingTest: public testing::TestWithParam<std::string>
-
class
CustomIntegerNamingTest: public testing::TestWithParam<int>
-
class
CustomLambdaNamingTest: public testing::TestWithParam<std::string>
-
struct
CustomParamNameFunctor Public Functions
-
inline std::string
operator()(const ::testing::TestParamInfo<std::string> &inf)
-
inline std::string
-
struct
CustomStruct Public Functions
-
inline explicit
CustomStruct(int value)
Public Members
-
int
x
-
inline explicit
-
class
CustomStructNamingTest: public TestWithParam<CustomStruct>
-
class
package_template::Default_pid_factory Use a PID factory for the unittests.
Public Static Functions
Public Static Attributes
-
static std::vector<std::shared_ptr<Gains_configuration>>
configs_ The PID gains.
-
static std::vector<std::shared_ptr<Gains_configuration>>
-
class
package_template::DefaultConfiguration: public package_template::Gains_configuration - #include <default_configuration.hpp>
Default configuration for the kp, kd, ki paramters.
This class initialize the PID gains as follow:
kp = DEFAULT_KP,
kd = DEFAULT_KD
ki = DEFAULT_KI
Public Functions
-
inline
~DefaultConfiguration() Here we use the default destructor.
-
virtual double
get_kp() const Always returns DEFAULT_KP.
- Returns
double DEFAULT_KP
-
virtual double
get_kd() const Always returns DEFAULT_KD.
- Returns
double DEFAULT_KD
-
virtual double
get_ki() const Always returns DEFAULT_KI.
- Returns
double DEFAULT_KI
-
virtual bool
has_error() const Always returns false.
- Returns
true Never
- Returns
false Always
-
virtual std::string
get_error() const Always returns “no error”.
- Returns
std::string “no error”
-
template<typename
T>
classtesting::DefaultValue - #include <gmock-actions.h>
Public Static Functions
-
static inline void
Set(T x)
-
static inline void
SetFactory(FactoryFunction factory)
-
static inline void
Clear()
-
static inline bool
IsSet()
-
static inline bool
Exists()
-
static inline T
Get()
-
static inline void
Set(T x)
-
static inline void
SetFactory(FactoryFunction factory)
-
static inline void
Clear()
-
static inline bool
IsSet()
-
static inline bool
Exists()
-
static inline T
Get()
Private Static Attributes
-
static ValueProducer *
producer_= nullptr
-
static inline void
-
template<typename
T>
classtesting::DefaultValue<T&> - #include <gmock-actions.h>
Public Static Functions
-
static inline void
Set(T &x)
-
static inline void
Clear()
-
static inline bool
IsSet()
-
static inline bool
Exists()
-
static inline T &
Get()
-
static inline void
Set(T &x)
-
static inline void
Clear()
-
static inline bool
IsSet()
-
static inline bool
Exists()
-
static inline T &
Get()
Private Static Attributes
-
static T *
address_
-
static inline void
-
template<>
classtesting::DefaultValue<void> - #include <gmock-actions.h>
Public Static Functions
-
static inline bool
Exists()
-
static inline void
Get()
-
static inline bool
Exists()
-
static inline void
Get()
-
static inline bool
-
template<typename
T, typename...>
structdeferred_type - #include <common.h>
Defer the evaluation of type T until types Us are instantiated.
-
class
testing::gmock_more_actions_test::DeletionTester Public Functions
-
inline explicit
DeletionTester(bool *is_deleted)
-
inline
~DeletionTester()
Private Members
-
bool *
is_deleted_
-
inline explicit
-
class
testing::internal::Derived: public testing::internal::Base, public testing::internal::Base Public Functions
-
inline explicit
Derived(int n)
-
inline explicit
-
template<typename
T>
classDerivedTest: public CommonTest<T>
-
template<size_t
N, typename ...Ts>
structdescr - #include <descr.h>
Public Functions
-
inline constexpr
descr()
-
inline constexpr
descr(char const (&s)[N + 1])
-
template<size_t...
Is>
inline constexprdescr(char const (&s)[N + 1], index_sequence<Is...>)
-
template<typename ...
Chars>
inline constexprdescr(char c, Chars... cs)
-
inline constexpr
descr()
-
inline constexpr
descr(char const (&s)[N + 1])
-
template<size_t...
Is>
inline constexprdescr(char const (&s)[N + 1], index_sequence<Is...>)
-
template<typename ...
Chars>
inline constexprdescr(char c, Chars... cs)
Public Members
-
char
text[N+ 1]
-
inline constexpr
-
class
DetectNotInstantiatedTest: public testing::TestWithParam<int>
-
class
dict: public object, public object - #include <pytypes.h>
Public Functions
-
inline
dict()
-
template<typename ...
Args, typename = detail::enable_if_t<detail::all_of<detail::is_keyword_or_ds<Args>...>::value>, typenamecollector= detail::deferred_t<detail::unpacking_collector<>, Args...>>
inline explicitdict(Args&&... args)
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::dict_iterator
begin() const
-
inline detail::dict_iterator
end() const
-
inline void
clear() const
-
template<typename
T>
inline boolcontains(T &&key) const
-
inline
dict()
-
template<typename ...
Args, typename = detail::enable_if_t<detail::all_of<detail::is_keyword_or_ds<Args>...>::value>, typenamecollector= detail::deferred_t<detail::unpacking_collector<>, Args...>>
inline explicitdict(Args&&... args)
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::dict_iterator
begin() const
-
inline detail::dict_iterator
end() const
-
inline void
clear() const
-
template<typename
T>
inline boolcontains(T &&key) const
Private Static Functions
-
static inline PyObject *
raw_dict(PyObject *op) Call the
dictPython type always returns a new reference.
-
static inline PyObject *
raw_dict(PyObject *op) Call the
dictPython type always returns a new reference.
-
inline
-
class
dict_readonly - #include <pytypes.h>
Python’s dictionary protocol permits this to be a forward iterator.
Protected Types
-
using
iterator_category= std::forward_iterator_tag¶
-
using
reference= const value_type¶
-
using
pointer= arrow_proxy<const value_type>¶
-
using
iterator_category= std::forward_iterator_tag
-
using
reference= const value_type
-
using
pointer= arrow_proxy<const value_type>
Protected Functions
-
dict_readonly() = default¶
-
inline void
increment()¶
-
inline bool
equal(const dict_readonly &b) const¶
-
dict_readonly() = default
-
inline reference
dereference() const
-
inline void
increment()
-
inline bool
equal(const dict_readonly &b) const
-
using
-
class
DisabledTest: public Test
-
template<typename ...
Actions>
structtesting::internal::DoAllAction - #include <gmock-actions.h>
Public Functions
-
template<typename
R, typename ...Args>
inlineoperator Action<R(Args...)>() const
-
template<typename
R, typename ...Args>
inlineoperator Action<R(Args...)>() const
Public Members
-
std::tuple<Actions...>
actions
Private Types
-
using
NonFinalType= typename std::conditional<std::is_scalar<T>::value, T, const T&>::type
-
using
NonFinalType= typename std::conditional<std::is_scalar<T>::value, T, const T&>::type
-
template<typename
-
struct
doc - #include <attr.h>
Annotation for documentation.
Public Functions
-
inline
doc(const char *value)
-
inline
doc(const char *value)
Public Members
-
const char *
value
-
inline
-
class
testing::internal::DoDefaultAction - #include <gmock-actions.h>
Public Functions
-
template<typename
F>
inlineoperator Action<F>() const
-
template<typename
F>
inlineoperator Action<F>() const
-
template<typename
-
class
DogAdder Public Functions
-
inline explicit
DogAdder(const char *a_value)
-
inline
DogAdder(const DogAdder &other)
-
inline bool
operator<(const DogAdder &other) const
-
inline const std::string &
value() const
Private Members
-
std::string
value_
-
inline explicit
-
class
dtype: public object, public object - #include <numpy.h>
Public Functions
-
PYBIND11_OBJECT_DEFAULT (dtype, object, detail::npy_api::get().PyArrayDescr_Check_)
-
inline explicit
dtype(const buffer_info &info)
-
inline explicit
dtype(const std::string &format)
-
inline
dtype(const char *format)
-
inline ssize_t
itemsize() const Size of the data type in bytes.
-
inline bool
has_fields() const Returns true for structured data types.
-
inline char
kind() const Single-character type code.
-
PYBIND11_OBJECT_DEFAULT (dtype, object, detail::npy_api::get().PyArrayDescr_Check_)
-
inline explicit
dtype(const buffer_info &info)
-
inline explicit
dtype(const std::string &format)
-
inline
dtype(const char *format)
-
inline ssize_t
itemsize() const Size of the data type in bytes.
-
inline bool
has_fields() const Returns true for structured data types.
-
inline char
kind() const Single-character type code.
Public Static Functions
-
static inline dtype
from_args(object args) This is essentially the same as calling numpy.dtype(args) in Python.
-
template<typename
T>
static inline dtypeof() Return dtype associated with a C++ type.
-
static inline dtype
from_args(object args) This is essentially the same as calling numpy.dtype(args) in Python.
-
template<typename
T>
static inline dtypeof() Return dtype associated with a C++ type.
Private Functions
-
-
template<typename
type>
classduration_caster - #include <chrono.h>
Public Types
-
typedef type::rep
rep
-
typedef type::period
period
-
typedef std::chrono::duration<uint_fast32_t, std::ratio<86400>>
days
-
typedef type::rep
rep
-
typedef type::period
period
-
typedef std::chrono::duration<uint_fast32_t, std::ratio<86400>>
days
Public Functions
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER (type, _("datetime.timedelta"))
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER (type, _("datetime.timedelta"))
Public Static Functions
-
static inline const std::chrono::duration<rep, period> &
get_duration(const std::chrono::duration<rep, period> &src)
-
template<typename
Clock>
static inline std::chrono::duration<rep, period>get_duration(const std::chrono::time_point<Clock, std::chrono::duration<rep, period>> &src)
-
static inline handle
cast(const type &src, return_value_policy, handle)
-
static inline const std::chrono::duration<rep, period> &
get_duration(const std::chrono::duration<rep, period> &src)
-
template<typename
Clock>
static inline std::chrono::duration<rep, period>get_duration(const std::chrono::time_point<Clock, std::chrono::duration<rep, period>> &src)
-
static inline handle
cast(const type &src, return_value_policy, handle)
-
typedef type::rep
-
struct
dynamic_attr - #include <attr.h>
Annotation which enables dynamic attributes, i.e. adds
__dict__to a class.
-
class
DynamicFixture: public testing::Test Subclassed by DynamicTest< Pass >
Protected Functions
-
inline
DynamicFixture()
-
inline
~DynamicFixture() override
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
-
inline
-
template<bool
Pass>
classDynamicTest: public DynamicUnitTestFixture, public DynamicFixture Public Functions
-
inline virtual void
TestBody() override
Private Functions
-
inline virtual void
TestBody() override
-
inline virtual void
-
class
DynamicUnitTestFixture: public testing::Test Subclassed by DynamicTest< Pass >
-
template<typename
Type>
structeigen_extract_stride - #include <eigen.h>
-
template<typename
PlainObjectType, intMapOptions, typenameStrideType>
structeigen_extract_stride<Eigen::Map<PlainObjectType, MapOptions, StrideType>> - #include <eigen.h>
-
template<typename
PlainObjectType, intOptions, typenameStrideType>
structeigen_extract_stride<Eigen::Ref<PlainObjectType, Options, StrideType>> - #include <eigen.h>
-
template<typename
MapType>
structeigen_map_caster - #include <eigen.h>
Public Functions
-
bool
load(handle, bool) = delete
-
operator MapType() = delete
-
bool
load(handle, bool) = delete
-
operator MapType() = delete
Public Static Functions
-
static inline handle
cast(const MapType &src, return_value_policy policy, handle parent)
-
static inline handle
cast(const MapType &src, return_value_policy policy, handle parent)
Public Static Attributes
-
static constexpr auto
name= props::descriptor
-
bool
-
template<bool
EigenRowMajor>
structEigenConformable - #include <eigen.h>
Public Functions
-
inline
EigenConformable(bool fits = false)
-
inline
EigenConformable(EigenIndex r, EigenIndex c, EigenIndex rstride, EigenIndex cstride)
-
inline
EigenConformable(EigenIndex r, EigenIndex c, EigenIndex stride)
-
template<typename
props>
inline boolstride_compatible() const
-
inline
operator bool() const
-
inline
EigenConformable(bool fits = false)
-
inline
EigenConformable(EigenIndex r, EigenIndex c, EigenIndex rstride, EigenIndex cstride)
-
inline
EigenConformable(EigenIndex r, EigenIndex c, EigenIndex stride)
-
template<typename
props>
inline boolstride_compatible() const
-
inline
operator bool() const
Public Members
-
bool
conformable= false
-
EigenIndex
rows= 0
-
EigenIndex
cols= 0
-
EigenDStride
stride= {0, 0}
-
bool
negativestrides= false
-
inline
-
template<class
Scalar, intRows, intCols, intAlign, intRowsAtCompileTime, intColsAtCompileTime>
structYAML::EigenMatrixConverter - #include <yaml_eigen.hpp>
Public Types
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
MatrixType
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
MatrixType
Public Static Functions
-
static inline void
resize_if_needed(int rows, int cols, MatrixType &rhs)
-
static inline Scalar &
access_element(int r, int c, MatrixType &rhs)
-
static inline void
resize_if_needed(int rows, int cols, MatrixType &rhs)
-
static inline Scalar &
access_element(int r, int c, MatrixType &rhs)
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
-
template<typename
Type_>
structEigenProps - #include <eigen.h>
Public Types
-
using
Type= Type_
-
using
Scalar= typename Type::Scalar
-
using
StrideType= typename eigen_extract_stride<Type>::type
-
if_zero = std::integral_constant< EigenIndex, i==0 ? ifzero :i >
-
using
Type= Type_
-
using
Scalar= typename Type::Scalar
-
using
StrideType= typename eigen_extract_stride<Type>::type
-
if_zero = std::integral_constant< EigenIndex, i==0 ? ifzero :i >
Public Static Functions
-
static inline EigenConformable<row_major>
conformable(const array &a)
-
static inline EigenConformable<row_major>
conformable(const array &a)
Public Static Attributes
-
static constexpr EigenIndex
rows= Type::RowsAtCompileTime
-
static constexpr EigenIndex
cols= Type::ColsAtCompileTime
-
static constexpr EigenIndex
size= Type::SizeAtCompileTime
-
static constexpr bool
row_major= Type::IsRowMajor
-
static constexpr bool
vector= Type::IsVectorAtCompileTime
-
static constexpr bool
fixed_rows= rows != Eigen::Dynamic
-
static constexpr bool
fixed_cols= cols != Eigen::Dynamic
-
static constexpr bool
fixed= size != Eigen::Dynamic
-
static constexpr bool
dynamic= !fixed_rows && !fixed_cols
-
static constexpr EigenIndex
inner_stride= if_zero<StrideType::InnerStrideAtCompileTime, 1>::value
-
static constexpr EigenIndex outer_stride = if_zero<StrideType::OuterStrideAtCompileTime, vector ? size : row_major ? cols : rows>::value
-
static constexpr bool
dynamic_stride= inner_stride == Eigen::Dynamic && outer_stride == Eigen::Dynamic
-
static constexpr bool requires_row_major = !dynamic_stride && !vector && (row_major ? inner_stride : outer_stride) == 1
-
static constexpr bool requires_col_major = !dynamic_stride && !vector && (row_major ? outer_stride : inner_stride) == 1
-
static constexpr bool
show_writeable= is_eigen_dense_map<Type>::value && is_eigen_mutable_map<Type>::value
-
static constexpr bool
show_order= is_eigen_dense_map<Type>::value
-
static constexpr bool
show_c_contiguous= show_order && requires_row_major
-
static constexpr bool
show_f_contiguous= !show_c_contiguous && show_order && requires_col_major
-
static constexpr auto
descriptor= _("numpy.ndarray[") + npy_format_descriptor<Scalar>::name + _("[") + _<fixed_rows>(_<(size_t)rows>(), _("m")) + _(", ") + _<fixed_cols>(_<(size_t)cols>(), _("n")) + _("]") + _<show_writeable>(", flags.writeable", "") + _<show_c_contiguous>(", flags.c_contiguous", "") + _<show_f_contiguous>(", flags.f_contiguous", "") + _("]")
-
using
-
template<class
Scalar, intRows, intCols, intAlign, intRowsAtCompileTime, intColsAtCompileTime>
structYAML::EigenVectorConverter - #include <yaml_eigen.hpp>
Public Types
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
VectorType
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
VectorType
Public Static Functions
-
static inline void
resize_if_needed(int rows, int cols, VectorType &rhs)
-
static inline Scalar &
access_element(int r, int c, VectorType &rhs)
-
static inline void
resize_if_needed(int rows, int cols, VectorType &rhs)
-
static inline Scalar &
access_element(int r, int c, VectorType &rhs)
-
typedef Eigen::Matrix<Scalar, Rows, Cols, Align, RowsAtCompileTime, ColsAtCompileTime>
-
struct
embedded_module - #include <embed.h>
Python 2.7/3.x compatible version of
PyImport_AppendInittaband error checks.Public Types
-
using
init_t= void (*)()
-
using
init_t= void (*)()
-
using
-
class
EmptyBasenameParamInst: public testing::TestWithParam<int>
-
class
testing::EmptyTestEventListener: public testing::TestEventListener, public testing::TestEventListener - #include <gtest.h>
Subclassed by SequenceTestingListener, testing::internal::JsonUnitTestResultPrinter, testing::internal::XmlUnitTestResultPrinter, TestListener, ThrowListener
Public Functions
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
inline virtual void
OnTestIterationStart(const UnitTest&, int) override
-
inline virtual void
OnEnvironmentsSetUpStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsSetUpEnd(const UnitTest&) override
-
inline virtual void
OnTestSuiteStart(const TestSuite&) override
-
inline virtual void
OnTestCaseStart(const TestCase&) override
-
inline virtual void
OnTestStart(const TestInfo&) override
-
inline virtual void
OnTestPartResult(const TestPartResult&) override
-
inline virtual void
OnTestEnd(const TestInfo&) override
-
inline virtual void
OnTestSuiteEnd(const TestSuite&) override
-
inline virtual void
OnTestCaseEnd(const TestCase&) override
-
inline virtual void
OnEnvironmentsTearDownStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsTearDownEnd(const UnitTest&) override
-
inline virtual void
OnTestIterationEnd(const UnitTest&, int) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
inline virtual void
OnTestIterationStart(const UnitTest&, int) override
-
inline virtual void
OnEnvironmentsSetUpStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsSetUpEnd(const UnitTest&) override
-
inline virtual void
OnTestSuiteStart(const TestSuite&) override
-
inline virtual void
OnTestCaseStart(const TestCase&) override
-
inline virtual void
OnTestStart(const TestInfo&) override
-
inline virtual void
OnTestPartResult(const TestPartResult&) override
-
inline virtual void
OnTestEnd(const TestInfo&) override
-
inline virtual void
OnTestSuiteEnd(const TestSuite&) override
-
inline virtual void
OnTestCaseEnd(const TestCase&) override
-
inline virtual void
OnEnvironmentsTearDownStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsTearDownEnd(const UnitTest&) override
-
inline virtual void
OnTestIterationEnd(const UnitTest&, int) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
-
inline virtual void
-
template<typename
Type>
classenum_: public class_<Type>, public class_<Type> - #include <pybind11.h>
Binds C++ enumerations and enumeration classes to Python.
Public Types
-
using
Scalar= typename std::underlying_type<Type>::type
-
using
Scalar= typename std::underlying_type<Type>::type
Public Functions
-
template<typename ...
Extra>
inlineenum_(const handle &scope, const char *name, const Extra&... extra)
-
inline enum_ &
export_values() Export enumeration entries into the parent scope.
-
inline enum_ &
value(char const *name, Type value, const char *doc = nullptr) Add an enumeration entry.
-
template<typename ...
Extra>
inlineenum_(const handle &scope, const char *name, const Extra&... extra)
-
inline enum_ &
export_values() Export enumeration entries into the parent scope.
Private Members
-
detail::enum_base
m_base
-
using
-
struct
enum_base - #include <pybind11.h>
Public Functions
-
inline PYBIND11_NOINLINE void init (bool is_arithmetic, bool is_convertible)
-
inline PYBIND11_NOINLINE void value (char const *name_, object value, const char *doc=nullptr)
-
inline PYBIND11_NOINLINE void export_values ()
-
inline PYBIND11_NOINLINE void init (bool is_arithmetic, bool is_convertible)
-
inline PYBIND11_NOINLINE void value (char const *name_, object value, const char *doc=nullptr)
-
inline PYBIND11_NOINLINE void export_values ()
-
-
class
testing::Environment - #include <gtest.h>
Subclassed by BarEnvironment, FooEnvironment, SetupEnvironment, TestGenerationEnvironment< kExpectedCalls >, testing::internal::EnvironmentInvocationCatcher, testing::internal::FinalSuccessChecker
Public Functions
-
inline virtual
~Environment()
-
inline virtual void
SetUp()
-
inline virtual void
TearDown()
-
inline virtual
~Environment()
-
inline virtual void
SetUp()
-
inline virtual void
TearDown()
Private Functions
-
inline virtual Setup_should_be_spelled_SetUp *
Setup()
-
inline virtual Setup_should_be_spelled_SetUp *
Setup()
-
inline virtual
-
class
testing::internal::EnvironmentInvocationCatcher: public testing::Environment Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline virtual void
-
class
testing::internal::EqHelper - #include <gtest.h>
Public Static Functions
-
template<typename
T1, typenameT2, typename std::enable_if<!std::is_integral<T1>::value || !std::is_pointer<T2>::value>::type* = nullptr>
static inline AssertionResultCompare(const char *lhs_expression, const char *rhs_expression, const T1 &lhs, const T2 &rhs)
-
static inline AssertionResult
Compare(const char *lhs_expression, const char *rhs_expression, BiggestInt lhs, BiggestInt rhs)
-
template<typename
T>
static inline AssertionResultCompare(const char *lhs_expression, const char *rhs_expression, std::nullptr_t, T *rhs)
-
template<typename
T1, typenameT2, typename std::enable_if<!std::is_integral<T1>::value || !std::is_pointer<T2>::value>::type* = nullptr>
static inline AssertionResultCompare(const char *lhs_expression, const char *rhs_expression, const T1 &lhs, const T2 &rhs)
-
static inline AssertionResult
Compare(const char *lhs_expression, const char *rhs_expression, BiggestInt lhs, BiggestInt rhs)
-
template<typename
T>
static inline AssertionResultCompare(const char *lhs_expression, const char *rhs_expression, std::nullptr_t, T *rhs)
-
template<typename
-
class
error_already_set: public runtime_error, public runtime_error - #include <pytypes.h>
Fetch and hold an error which was already set in Python.
An instance of this is typically thrown to propagate python-side errors back through C++ which can either be caught manually or else falls back to the function dispatcher (which then raises the captured error back to python).
Public Functions
-
inline
error_already_set() Constructs a new exception from the current Python error indicator, if any.
The current Python error indicator will be cleared.
-
error_already_set(const error_already_set&) = default
-
error_already_set(error_already_set&&) = default
-
inline
~error_already_set()
-
inline void
restore() Give the currently-held error back to Python, if any.
If there is currently a Python error already set it is cleared first. After this call, the current object no longer stores the error variables (but the
.what()string is still available).
-
inline void
clear()
-
inline bool
matches(handle exc) const Check if the currently trapped error type matches the given Python exception class (or a subclass thereof).
May also be passed a tuple to search for any exception class matches in the given tuple.
-
inline const object &
type() const
-
inline const object &
value() const
-
inline const object &
trace() const
-
inline
error_already_set() Constructs a new exception from the current Python error indicator, if any.
The current Python error indicator will be cleared.
-
error_already_set(const error_already_set&) = default
-
error_already_set(error_already_set&&) = default
-
inline
~error_already_set()
-
inline void
restore() Give the currently-held error back to Python, if any.
If there is currently a Python error already set it is cleared first. After this call, the current object no longer stores the error variables (but the
.what()string is still available).
-
inline void
clear()
-
inline bool
matches(handle exc) const Check if the currently trapped error type matches the given Python exception class (or a subclass thereof).
May also be passed a tuple to search for any exception class matches in the given tuple.
-
inline const object &
type() const
-
inline const object &
value() const
-
inline const object &
trace() const
-
inline
-
struct
error_scope - #include <common.h>
RAII wrapper that temporarily clears any Python error state.
Public Functions
-
inline
error_scope()
-
inline
~error_scope()
-
inline
error_scope()
-
inline
~error_scope()
Public Members
-
PyObject *
type
-
PyObject *
value
-
PyObject *
trace
-
inline
-
class
testing::internal::EventRecordingListener: public testing::TestEventListener Public Functions
-
inline explicit
EventRecordingListener(const char *name)
Protected Functions
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
inline virtual void
OnTestIterationStart(const UnitTest&, int iteration) override
-
inline virtual void
OnEnvironmentsSetUpStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsSetUpEnd(const UnitTest&) override
-
inline virtual void
OnTestCaseStart(const TestCase&) override
-
inline virtual void
OnTestStart(const TestInfo&) override
-
inline virtual void
OnTestPartResult(const TestPartResult&) override
-
inline virtual void
OnTestEnd(const TestInfo&) override
-
inline virtual void
OnTestCaseEnd(const TestCase&) override
-
inline virtual void
OnEnvironmentsTearDownStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsTearDownEnd(const UnitTest&) override
-
inline virtual void
OnTestIterationEnd(const UnitTest&, int iteration) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
Private Functions
-
inline std::string
GetFullMethodName(const char *name)
Private Members
-
std::string
name_
-
inline explicit
-
class
testing::internal::EventRecordingListener2: public testing::TestEventListener Public Functions
-
inline explicit
EventRecordingListener2(const char *name)
Protected Functions
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
inline virtual void
OnTestIterationStart(const UnitTest&, int iteration) override
-
inline virtual void
OnEnvironmentsSetUpStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsSetUpEnd(const UnitTest&) override
-
inline virtual void
OnTestSuiteStart(const TestSuite&) override
-
inline virtual void
OnTestStart(const TestInfo&) override
-
inline virtual void
OnTestPartResult(const TestPartResult&) override
-
inline virtual void
OnTestEnd(const TestInfo&) override
-
inline virtual void
OnTestSuiteEnd(const TestSuite&) override
-
inline virtual void
OnEnvironmentsTearDownStart(const UnitTest&) override
-
inline virtual void
OnEnvironmentsTearDownEnd(const UnitTest&) override
-
inline virtual void
OnTestIterationEnd(const UnitTest&, int iteration) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
Private Functions
-
inline std::string
GetFullMethodName(const char *name)
Private Members
-
std::string
name_
-
inline explicit
-
template<template<typename> class
Predicate, typenameDefault, typename ...Ts>
structexactly_one - #include <common.h>
Return the one and only type which matches the predicate, or Default if none match.
If more than one type matches the predicate, fail at compile-time.
Public Types
-
using
type= conditional_t<found, typename pack_element<index, Ts...>::type, Default>
-
using
type= conditional_t<found, typename pack_element<index, Ts...>::type, Default>
Public Static Attributes
-
static constexpr auto
found= constexpr_sum(Predicate<Ts>::value...)
-
static constexpr auto index = found ? constexpr_first<Predicate, Ts...>() : 0
-
using
-
template<template<typename> class
P, typenameDefault>
structexactly_one<P, Default> - #include <common.h>
-
template<typename
type>
classexception: public object, public object - #include <pybind11.h>
Wrapper to generate a new Python exception type.
This should only be used with PyErr_SetString for now. It is not (yet) possible to use as a py::base. Template type argument is reserved for future use.
Public Functions
-
exception() = default
-
inline
exception(handle scope, const char *name, PyObject *base = PyExc_Exception)
-
inline void
operator()(const char *message)
-
exception() = default
-
inline
exception(handle scope, const char *name, PyObject *base = PyExc_Exception)
-
inline void
operator()(const char *message)
-
-
struct
ExcessiveArg - #include <gmock-actions.h>
-
class
testing::internal::ExpectationTester Public Functions
-
inline void
SetCallCount(int n, ExpectationBase *exp)
-
inline void
-
class
ExpectFailureTest: public testing::Test Public Types
-
enum
FailureMode Values:
-
enumerator
FATAL_FAILURE
-
enumerator
NONFATAL_FAILURE
-
enumerator
Public Static Functions
-
static inline void
AddFailure(FailureMode failure)
-
enum
-
class
ExternalGeneratorTest: public testing::TestWithParam<int>
-
class
ExternalInstantiationTest: public testing::TestWithParam<int> - #include <googletest-param-test-test.h>
-
template<typename
CFunc, typenameAFunc= void_type (*)(), typename = function_signature_t<CFunc>, typename = function_signature_t<AFunc>>
structfactory - #include <init.h>
-
template<typename
CFunc, typenameAFunc, typenameCReturn, typename ...CArgs, typenameAReturn, typename ...AArgs>
structfactory<CFunc, AFunc, CReturn(CArgs...), AReturn(AArgs...)> - #include <init.h>
Public Functions
-
template<typename
Func, typenameReturn, typename ...Args>
structfactory<Func, void_type (*)(), Return(Args...)> - #include <init.h>
Public Members
-
remove_reference_t<Func>
class_factory
-
remove_reference_t<Func>
-
class
testing::DefaultValue::FactoryValueProducer: public testing::DefaultValue<T>::ValueProducer, public testing::DefaultValue<T>::ValueProducer Public Functions
-
inline explicit
FactoryValueProducer(FactoryFunction factory)
-
inline virtual T
Produce() override
-
inline explicit
FactoryValueProducer(FactoryFunction factory)
-
inline virtual T
Produce() override
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer)
Private Members
-
const FactoryFunction
factory_
-
inline explicit
-
class
FailedTest: public Test
-
class
FailingParamTest: public testing::TestWithParam<int>
-
struct
faketype - #include <gtest.h>
-
class
FatalFailureInFixtureConstructorTest: public testing::Test Protected Functions
-
inline
FatalFailureInFixtureConstructorTest()
-
inline
~FatalFailureInFixtureConstructorTest() override
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Private Functions
-
inline void
Init()
-
inline
-
class
FatalFailureInSetUpTest: public testing::Test Protected Functions
-
inline
~FatalFailureInSetUpTest() override
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Private Functions
-
inline void
Deinit()
-
inline
-
struct
field_descriptor - #include <numpy.h>
-
class
FieldHelper - #include <gmock_link_test.h>
Public Functions
-
inline explicit
FieldHelper(int a_field)
-
inline int
field() const
Public Members
-
int
field_
-
inline explicit
-
class
package_template::File_configuration: public package_template::Gains_configuration - #include <file_configuration.hpp>
Reading configuration from yaml file.
Public Functions
-
File_configuration(std::string yaml_file) Returns error encountered when reading configuration.
- See
- Parameters
yaml_file – absolute path to configuration yaml file. The file is expected to have parameters “kp”, “kd” and “ki”
-
virtual double
get_kp() const Get the proportional gain.
- Returns
double
-
virtual double
get_kd() const Get the derivative gain.
- Returns
double
-
virtual double
get_ki() const Get the integral gain.
- Returns
double
-
virtual bool
has_error() const Enquire if an error was encountered while reading the configuration.
- See
- Returns
true if an error has been encountered
- Returns
false otherwise
-
virtual std::string
get_error() const returns error encountered when reading configuration
- See
Private Members
-
double
kp_ Proportinal gain.
-
double
kd_ Derivative gain.
-
double
ki_ Integral gain.
-
std::string
error_message_ Internal error message.
-
bool
error_ True if an error occured.
-
-
class
testing::internal::FinalSuccessChecker: public testing::Environment Protected Functions
-
inline virtual void
TearDown() override
-
inline virtual void
-
template<typename
T, typenameE, typenamePrinter, typename ...Printers>
structFindFirstPrinter - #include <gtest-printers.h>
-
template<typename
T, typenamePrinter, typename ...Printers>
structtesting::internal::FindFirstPrinter<T, decltype(Printer::PrintValue(std::declval<const T&>(), nullptr)), Printer, Printers...> - #include <gtest-printers.h>
-
class
testing::DefaultValue::FixedValueProducer: public testing::DefaultValue<T>::ValueProducer, public testing::DefaultValue<T>::ValueProducer Public Functions
-
inline explicit
FixedValueProducer(T value)
-
inline virtual T
Produce() override
-
inline explicit
FixedValueProducer(T value)
-
inline virtual T
Produce() override
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer)
Private Members
-
const T
value_
-
inline explicit
-
class
Fixture: public Test Protected Functions
-
inline void
SetUp() override
-
inline void
-
struct
testing::Flags Public Functions
-
inline
Flags()
Public Members
-
bool
also_run_disabled_tests
-
bool
break_on_failure
-
bool
catch_exceptions
-
bool
death_test_use_fork
-
bool
fail_fast
-
const char *
filter
-
bool
list_tests
-
const char *
output
-
bool
brief
-
bool
print_time
-
int32_t
random_seed
-
int32_t
repeat
-
bool
shuffle
-
int32_t
stack_trace_depth
-
const char *
stream_result_to
-
bool
throw_on_failure
Public Static Functions
-
static inline Flags
AlsoRunDisabledTests(bool also_run_disabled_tests)
-
static inline Flags
BreakOnFailure(bool break_on_failure)
-
static inline Flags
CatchExceptions(bool catch_exceptions)
-
static inline Flags
DeathTestUseFork(bool death_test_use_fork)
-
static inline Flags
FailFast(bool fail_fast)
-
static inline Flags
Filter(const char *filter)
-
static inline Flags
ListTests(bool list_tests)
-
static inline Flags
Output(const char *output)
-
static inline Flags
Brief(bool brief)
-
static inline Flags
PrintTime(bool print_time)
-
static inline Flags
RandomSeed(int32_t random_seed)
-
static inline Flags
Repeat(int32_t repeat)
-
static inline Flags
Shuffle(bool shuffle)
-
static inline Flags
StackTraceDepth(int32_t stack_trace_depth)
-
static inline Flags
StreamResultTo(const char *stream_result_to)
-
static inline Flags
ThrowOnFailure(bool throw_on_failure)
-
inline
-
class
float_: public object, public object - #include <pytypes.h>
Public Functions
-
inline
float_(float value)
-
inline
float_(double value = .0)
-
inline
operator float() const
-
inline
operator double() const
-
inline
float_(float value)
-
inline
float_(double value = .0)
-
inline
operator float() const
-
inline
operator double() const
-
inline
-
class
testing::gmock_more_actions_test::Foo Public Functions
-
inline
Foo()
-
inline int
Nullary() const
-
inline short
Unary(long x)
-
inline std::string
Binary(const std::string &str, char c) const
-
inline int
Ternary(int x, bool y, char z)
-
inline int
SumOf4(int a, int b, int c, int d) const
-
inline int
SumOf5(int a, int b, int c, int d, int e)
-
inline int
SumOf6(int a, int b, int c, int d, int e, int f)
-
inline std::string
Concat7(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7)
-
inline std::string
Concat8(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8)
-
inline std::string
Concat9(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9)
-
inline std::string
Concat10(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9, const char *s10)
Private Members
-
int
value_
-
inline
-
class
testing::gmock_nice_strict_test::Foo Subclassed by testing::gmock_nice_strict_test::MockFoo
Public Functions
-
inline virtual
~Foo()
-
virtual void
DoThis() = 0
-
virtual int
DoThat(bool flag) = 0
-
inline virtual
-
struct
testing::gtest_printers_test::Foo Public Functions
-
inline virtual
~Foo()
-
inline int
MyMethod(char x)
-
inline virtual char
MyVirtualMethod(int)
Public Members
-
int
value
-
inline virtual
-
class
FooEnvironment: public testing::Environment Public Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline virtual void
-
class
testing::gmock_function_mocker_test::FooInterface Subclassed by testing::gmock_function_mocker_test::LegacyMockFoo, testing::gmock_function_mocker_test::MockFoo
Public Types
-
using
fn_ptr= int (*)(bool)
Public Functions
-
inline virtual
~FooInterface()
-
virtual void
VoidReturning(int x) = 0
-
virtual int
Nullary() = 0
-
virtual bool
Unary(int x) = 0
-
virtual long
Binary(short x, int y) = 0
-
virtual int
Decimal(bool b, char c, short d, int e, long f, float g, double h, unsigned i, char *j, const std::string &k) = 0
-
virtual bool
TakesNonConstReference(int &n) = 0
-
virtual std::string
TakesConstReference(const int &n) = 0
-
virtual bool
TakesConst(const int x) = 0
-
virtual int
OverloadedOnArgumentNumber() = 0
-
virtual int
OverloadedOnArgumentNumber(int n) = 0
-
virtual int
OverloadedOnArgumentType(int n) = 0
-
virtual char
OverloadedOnArgumentType(char c) = 0
-
virtual int
OverloadedOnConstness() = 0
-
virtual char
OverloadedOnConstness() const = 0
-
virtual int
TypeWithHole(int (*func)()) = 0
-
virtual int
TypeWithComma(const std::map<int, std::string> &a_map) = 0
-
virtual int
TypeWithTemplatedCopyCtor(const TemplatedCopyable<int>&) = 0
-
virtual fn_ptr
ReturnsFunctionPointer2(int) = 0
-
virtual int
RefQualifiedConstRef() const & = 0
-
virtual int
RefQualifiedConstRefRef() const && = 0
-
virtual int
RefQualifiedRef() & = 0
-
virtual int
RefQualifiedRefRef() && = 0
-
virtual int
RefQualifiedOverloaded() const & = 0
-
virtual int
RefQualifiedOverloaded() const && = 0
-
virtual int
RefQualifiedOverloaded() & = 0
-
virtual int
RefQualifiedOverloaded() && = 0
Public Members
-
int(*)(bool) ReturnsFunctionPointer1 (int)
-
using
-
template<typename
T, typenameSFINAE= void>
structformat_descriptor - #include <common.h>
-
template<size_t
N>
structformat_descriptor<char[N]> - #include <numpy.h>
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<size_t
N>
structformat_descriptor<std::array<char, N>> - #include <numpy.h>
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<typename
T>
structformat_descriptor<std::complex<T>, detail::enable_if_t<std::is_floating_point<T>::value>> - #include <complex.h>
glibc defines I as a macro which breaks things, e.g., boost template names
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<typename
T>
structformat_descriptor<T, detail::enable_if_t<detail::array_info<T>::is_array>> - #include <numpy.h>
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<typename
T>
structformat_descriptor<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> - #include <numpy.h>
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<typename
T>
structformat_descriptor<T, detail::enable_if_t<std::is_arithmetic<T>::value>> - #include <common.h>
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<typename
T>
structformat_descriptor<T, detail::enable_if_t<std::is_enum<T>::value>> - #include <numpy.h>
Public Static Functions
-
static inline std::string
format()
-
static inline std::string
format()
-
static inline std::string
-
template<typename
ToPrint, typenameOtherOperand>
classtesting::internal::FormatForComparison - #include <gtest-printers.h>
-
template<typename
ToPrint, size_tN, typenameOtherOperand>
classtesting::internal::FormatForComparison<ToPrint[N], OtherOperand> - #include <gtest-printers.h>
-
class
function: public object, public object - #include <pytypes.h>
Subclassed by cpp_function, cpp_function
-
struct
function_call - #include <cast.h>
Internal data associated with a single function call.
Public Functions
-
inline
function_call(const function_record &f, handle p)
-
function_call(const function_record &f, handle p)
Public Members
-
const function_record &
func The function data:
-
std::vector<handle>
args Arguments passed to the function:
-
std::vector<bool>
args_convert The
convertvalue the arguments should be loaded with.
-
object
args_ref Extra references for the optional
py::argsand/orpy::kwargsarguments (which, if present, are also inargsbut without a reference).
-
object
kwargs_ref
-
handle
parent The parent, if any.
-
handle
init_self If this is a call to an initializer, this argument contains
self
-
inline
-
struct
function_record - #include <attr.h>
Internal data structure which holds metadata about a bound function (signature, overloads, etc.)
Public Functions
-
inline
function_record()
-
inline
function_record()
Public Members
-
char *
name= nullptr Function name.
-
char *
doc= nullptr
-
char *
signature= nullptr Human-readable version of the function signature.
-
std::vector<argument_record>
args List of registered keyword arguments.
-
handle(* impl )(function_call &) = nullptr Pointer to lambda function which converts arguments and performs the actual call.
-
void *
data[3] = {} Storage for the wrapped function pointer and captured data, if any.
-
void(* free_data )(function_record *ptr) = nullptr Pointer to custom destructor for ‘data’ (if needed)
-
return_value_policy
policy= return_value_policy::automatic Return value policy associated with this function.
-
bool
is_constructor True if name == ‘init’.
-
bool
is_new_style_constructor True if this is a new-style
__init__defined indetail/init.h
-
bool
is_stateless True if this is a stateless function pointer.
-
bool
is_operator True if this is an operator (add), etc.
-
bool
has_args True if the function has a ‘*args’ argument.
-
bool
has_kwargs True if the function has a ‘**kwargs’ argument.
-
bool
is_method True if this is a method.
-
std::uint16_t
nargs Number of arguments (including py::args and/or py::kwargs, if present)
-
PyMethodDef *
def= nullptr Python method object.
-
handle
scope Python handle to the parent scope (a class or a module)
-
handle
sibling Python handle to the sibling function representing an overload chain.
-
function_record *
next= nullptr Pointer to next overload.
-
inline
-
template<class
T>
classtesting::gmock_function_mocker_test::FunctionMockerTest: public testing::Test Protected Functions
-
inline
FunctionMockerTest()
-
inline
-
class
package_template::Gains_configuration - #include <gains_configuration.hpp>
Abstract class defining for the PID configuration.
This virtual object describes the configuration a PID objects is waiting for. Daughter class will for example be initialize through files, ROS params, etc.
Subclassed by package_template::DefaultConfiguration, package_template::File_configuration, package_template::RosParameters_configuration
Public Functions
-
inline virtual
~Gains_configuration() The default destructor do nothing.
-
virtual double
get_kp() const = 0 Get the proportional gain.
- Returns
double
-
virtual double
get_kd() const = 0 Get the derivative gain.
- Returns
double
-
virtual double
get_ki() const = 0 Get the integral gain.
- Returns
double
-
virtual bool
has_error() const = 0 Enquire if an error was encountered while reading the configuration.
- See
- Returns
true if an error has been encountered
- Returns
false otherwise
-
virtual std::string
get_error() const = 0 returns error encountered when reading configuration
- See
-
inline virtual
-
class
GeneratorEvaluationTest: public testing::TestWithParam<int> Public Static Functions
-
static inline int
param_value()
-
static inline void
set_param_value(int param_value)
Private Static Attributes
-
static int
param_value_= 0
-
static inline int
-
struct
generic_item - #include <pytypes.h>
-
template<typename
Policy>
classgeneric_iterator: public Policy, public Policy - #include <pytypes.h>
STL iterator template used for tuple, list, sequence and dict.
Public Types
-
using
difference_type= ssize_t
-
using
iterator_category= typename Policy::iterator_category
-
using
value_type= typename Policy::value_type
-
using
reference= typename Policy::reference
-
using
pointer= typename Policy::pointer
-
using
difference_type= ssize_t
-
using
iterator_category= typename Policy::iterator_category
-
using
value_type= typename Policy::value_type
-
using
reference= typename Policy::reference
-
using
pointer= typename Policy::pointer
Public Functions
-
generic_iterator() = default
-
inline reference
operator*() const
-
inline reference
operator[](difference_type n) const
-
inline pointer
operator->() const
-
inline It &
operator++()
-
inline It
operator++(int)
-
inline It &
operator--()
-
inline It
operator--(int)
-
inline It &
operator+=(difference_type n)
-
inline It &
operator-=(difference_type n)
-
generic_iterator() = default
-
inline reference
operator*() const
-
inline reference
operator[](difference_type n) const
-
inline pointer
operator->() const
-
inline It &
operator++()
-
inline It
operator++(int)
-
inline It &
operator--()
-
inline It
operator--(int)
-
inline It &
operator+=(difference_type n)
-
inline It &
operator-=(difference_type n)
Friends
-
inline friend friend It operator+ (const It &a, difference_type n)
-
inline friend friend It operator+ (difference_type n, const It &b)
-
inline friend friend It operator- (const It &a, difference_type n)
-
inline friend friend difference_type operator- (const It &a, const It &b)
-
inline friend friend bool operator== (const It &a, const It &b)
-
inline friend friend bool operator!= (const It &a, const It &b)
-
inline friend friend bool operator< (const It &a, const It &b)
-
inline friend friend bool operator> (const It &a, const It &b)
-
inline friend friend bool operator>= (const It &a, const It &b)
-
inline friend friend bool operator<= (const It &a, const It &b)
-
inline friend friend It operator+ (const It &a, difference_type n)
-
inline friend friend It operator+ (difference_type n, const It &b)
-
inline friend friend It operator- (const It &a, difference_type n)
-
inline friend friend difference_type operator- (const It &a, const It &b)
-
inline friend friend bool operator== (const It &a, const It &b)
-
inline friend friend bool operator!= (const It &a, const It &b)
-
inline friend friend bool operator< (const It &a, const It &b)
-
inline friend friend bool operator> (const It &a, const It &b)
-
inline friend friend bool operator>= (const It &a, const It &b)
-
inline friend friend bool operator<= (const It &a, const It &b)
-
using
-
class
generic_type: public object, public object - #include <pybind11.h>
Generic support for creating new Python heap types.
Protected Functions
-
inline void
initialize(const type_record &rec)¶
-
inline void
mark_parents_nonsimple(PyTypeObject *value)¶ Helper function which tags all parents of a type using mult. inheritance.
-
inline void
install_buffer_funcs(buffer_info *(*get_buffer)(PyObject*, void*), void *get_buffer_data, )¶
-
inline void
def_property_static_impl(const char *name, handle fget, handle fset, detail::function_record *rec_func)¶
-
inline void
initialize(const type_record &rec)
-
inline void
mark_parents_nonsimple(PyTypeObject *value) Helper function which tags all parents of a type using mult. inheritance.
-
inline void
install_buffer_funcs(buffer_info *(*get_buffer)(PyObject*, void*), void *get_buffer_data, )
Friends
- friend class class_
- friend class class_
-
inline void
-
template<typename
T1, typenameT2, typenameT3, intk4, boolk5, unsigned intk6, typenameT7, typenameT8, typenameT9>
structtesting::gmock_more_actions_test::GiantTemplate Public Functions
-
inline explicit
GiantTemplate(int a_value)
Public Members
-
int
value
-
inline explicit
-
class
gil_scoped_acquire - #include <pybind11.h>
-
class
gil_scoped_release - #include <pybind11.h>
-
class
testing::internal::GoogleTestFailureReporter: public FailureReporterInterface Public Functions
-
inline void
ReportFailure(FailureType type, const char *file, int line, const std::string &message) override
-
inline void
-
class
handle: public detail::object_api<handle>, public detail::object_api<handle> - #include <pytypes.h>
Holds a reference to a Python object (no reference counting)
The
handleclass is a thin wrapper around an arbitrary Python object (i.e. aPyObject *in Python’s C API). It does not perform any automatic reference counting and merely provides a basic C++ interface to various Python API functions... seealso:: The
objectclass inherits fromhandleand adds automatic reference counting features.Subclassed by args_proxy, args_proxy, kwargs_proxy, kwargs_proxy, object, object
Public Functions
-
handle() = default The default constructor creates a handle with a
nullptr-valued pointer.
-
inline
handle(PyObject *ptr) Creates a
handlefrom the given raw Python object pointer.
-
inline PyObject *
ptr() const Return the underlying
PyObject *pointer.
-
inline PyObject *&
ptr()
-
inline const handle &
inc_ref() const & Manually increase the reference count of the Python object.
Usually, it is preferable to use the
objectclass which derives fromhandleand calls this function automatically. Returns a reference to itself.
-
inline const handle &
dec_ref() const & Manually decrease the reference count of the Python object.
Usually, it is preferable to use the
objectclass which derives fromhandleand calls this function automatically. Returns a reference to itself.
-
template<typename
T>
Tcast() const Attempt to cast the Python object into the given C++ type.
A
cast_errorwill be throw upon failure.
-
inline explicit
operator bool() const Return
truewhen thehandlewraps a valid Python object.
-
inline bool
operator==(const handle &h) const Deprecated: Check that the underlying pointers are the same.
Equivalent to
obj1 is obj2in Python.
-
inline bool
operator!=(const handle &h) const
-
inline bool
check() const
-
handle() = default The default constructor creates a handle with a
nullptr-valued pointer.
-
inline
handle(PyObject *ptr) Creates a
handlefrom the given raw Python object pointer.
-
inline PyObject *
ptr() const Return the underlying
PyObject *pointer.
-
inline PyObject *&
ptr()
-
inline const handle &
inc_ref() const & Manually increase the reference count of the Python object.
Usually, it is preferable to use the
objectclass which derives fromhandleand calls this function automatically. Returns a reference to itself.
-
inline const handle &
dec_ref() const & Manually decrease the reference count of the Python object.
Usually, it is preferable to use the
objectclass which derives fromhandleand calls this function automatically. Returns a reference to itself.
-
template<typename
T>
Tcast() const Attempt to cast the Python object into the given C++ type.
A
cast_errorwill be throw upon failure.
-
inline explicit
operator bool() const Return
truewhen thehandlewraps a valid Python object.
-
inline bool
operator==(const handle &h) const Deprecated: Check that the underlying pointers are the same.
Equivalent to
obj1 is obj2in Python.
-
inline bool
operator!=(const handle &h) const
-
inline bool
check() const
-
template<>
inline voidcast() const
Protected Attributes
-
PyObject *
m_ptr= nullptr¶
-
-
template<typename
T>
structhandle_type_name - #include <cast.h>
-
template<>
structhandle_type_name<args> - #include <cast.h>
Public Static Attributes
-
static constexpr auto
name= _("*args")
-
static constexpr auto
-
template<typename
T, intFlags>
structhandle_type_name<array_t<T, Flags>> - #include <numpy.h>
Public Static Attributes
-
static constexpr auto
name= _("numpy.ndarray[") + npy_format_descriptor<T>::name + _("]")
-
static constexpr auto
-
template<>
structhandle_type_name<bytes> - #include <cast.h>
Public Static Attributes
-
static constexpr auto
name= _(PYBIND11_BYTES_NAME)
-
static constexpr auto
-
template<>
structhandle_type_name<kwargs> - #include <cast.h>
Public Static Attributes
-
static constexpr auto
name= _("**kwargs")
-
static constexpr auto
-
template<typename
T, typenameSFINAE= void>
structhas_operator_delete: public false_type, public false_type - #include <pybind11.h>
-
template<typename
T>
structhas_operator_delete<T, void_t<decltype(static_cast<void (*)(void*)>(T::operator delete))>> : public true_type, public true_type - #include <pybind11.h>
-
template<typename
T, typenameSFINAE= void>
structhas_operator_delete_size: public false_type, public false_type - #include <pybind11.h>
-
template<typename
T>
structhas_operator_delete_size<T, void_t<decltype(static_cast<void (*)(void*, size_t)>(T::operator delete))>> : public true_type, public true_type - #include <pybind11.h>
-
struct
HasDebugStringMethods Subclassed by InheritsDebugStringMethods
Public Functions
-
inline std::string
DebugString() const
-
inline std::string
ShortDebugString() const
-
inline std::string
-
struct
testing::internal::ImplBase::Holder - #include <gmock-actions.h>
Public Functions
-
inline explicit
operator const Impl&() const
-
inline explicit
operator const Impl&() const
Public Members
-
std::shared_ptr<Impl>
ptr
-
inline explicit
-
template<typename
T>
structholder_helper - #include <cast.h>
Helper class which abstracts away certain actions.
Users can provide specializations for custom holders, but it’s only necessary if the type has a non-standard interface.
-
template<typename
FunctionImpl>
structtesting::Action::IgnoreArgs Public Functions
-
template<typename ...
Args>
inline Resultoperator()(const Args&...) const
-
template<typename ...
Args>
inline Resultoperator()(const Args&...) const
Public Members
-
FunctionImpl
function_impl
-
template<typename ...
-
template<typename
A>
classtesting::internal::IgnoreResultAction - #include <gmock-actions.h>
Public Functions
-
inline explicit
IgnoreResultAction(const A &action)
-
template<typename
F>
inlineoperator Action<F>() const
-
inline explicit
IgnoreResultAction(const A &action)
-
template<typename
F>
inlineoperator Action<F>() const
Private Members
-
const A
action_
-
inline explicit
-
template<typename
F>
classtesting::internal::IgnoreResultAction::Impl: public testing::ActionInterface<F>, public testing::ActionInterface<F> Public Types
Public Functions
-
inline explicit
Impl(const A &action)
-
inline virtual void
Perform(const ArgumentTuple &args) override
-
inline explicit
Impl(const A &action)
-
inline virtual void
Perform(const ArgumentTuple &args) override
Private Types
Private Members
-
const Action<OriginalFunction>
action_
-
inline explicit
-
template<typename
R_, typenameF>
classtesting::internal::ReturnAction::Impl: public testing::ActionInterface<F>, public testing::ActionInterface<F> Public Types
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
Public Functions
-
inline virtual Result
Perform(const ArgumentTuple&) override
-
inline explicit
Impl(const std::shared_ptr<R> &value)
-
inline virtual Result
Perform(const ArgumentTuple&) override
-
typedef Function<F>::Result
-
template<typename
F>
classtesting::internal::ReturnRefAction::Impl: public testing::ActionInterface<F>, public testing::ActionInterface<F> Public Types
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
Public Functions
-
inline explicit
Impl(T &ref)
-
inline virtual Result
Perform(const ArgumentTuple&) override
-
inline explicit
Impl(T &ref)
-
inline virtual Result
Perform(const ArgumentTuple&) override
Private Members
-
T &
ref_
-
typedef Function<F>::Result
-
template<typename
F>
classtesting::internal::ReturnRefOfCopyAction::Impl: public testing::ActionInterface<F>, public testing::ActionInterface<F> Public Types
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
Public Functions
-
inline explicit
Impl(const T &value)
-
inline virtual Result
Perform(const ArgumentTuple&) override
-
inline explicit
Impl(const T &value)
-
inline virtual Result
Perform(const ArgumentTuple&) override
Private Members
-
T
value_
-
typedef Function<F>::Result
-
template<typename
R_, typenameF>
classtesting::internal::ReturnAction::Impl<ByMoveWrapper<R_>, F> : public testing::ActionInterface<F>, public testing::ActionInterface<F> Public Types
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
-
typedef Function<F>::Result
Result
-
typedef Function<F>::ArgumentTuple
ArgumentTuple
Public Functions
-
inline virtual Result
Perform(const ArgumentTuple&) override
-
inline explicit
Impl(const std::shared_ptr<R> &wrapper)
-
inline virtual Result
Perform(const ArgumentTuple&) override
Private Members
-
bool
performed_
-
const std::shared_ptr<R>
wrapper_
-
typedef Function<F>::Result
-
template<size_t...>
structindex_sequence - #include <common.h>
Index sequences.
-
struct
InheritsDebugStringMethods: public HasDebugStringMethods
-
struct
instance - #include <common.h>
The ‘instance’ type which needs to be standard layout (need to be able to use ‘offsetof’)
Public Functions
-
inline void
allocate_layout() Initializes all of the above type/values/holders data (but not the instance values themselves)
-
inline void
deallocate_layout() Destroys/deallocates all of the above.
-
inline value_and_holder
get_value_and_holder(const type_info *find_type = nullptr, bool throw_if_missing = true) Returns the value_and_holder wrapper for the given type (or the first, if
find_typeomitted).Extracts C++ value and holder pointer references from an instance (which may contain multiple values/holders for python-side multiple inheritance) that match the given type.
Returns a default-constructed (with
.inst = nullptr) object on failure ifthrow_if_missingis false.Throws an error if the given type (or ValueType, if omitted) is not a pybind11 base of the given instance. If
find_typeis omitted (or explicitly specified as nullptr) the first value/holder are returned, regardless of type (and the resulting .type will be nullptr).The returned object should be short-lived: in particular, it must not outlive the called-upon instance.
-
void
allocate_layout() Initializes all of the above type/values/holders data (but not the instance values themselves)
-
void
deallocate_layout() Destroys/deallocates all of the above.
-
value_and_holder
get_value_and_holder(const type_info *find_type = nullptr, bool throw_if_missing = true) Returns the value_and_holder wrapper for the given type (or the first, if
find_typeomitted).Returns a default-constructed (with
.inst = nullptr) object on failure ifthrow_if_missingis false.
Public Members
-
void *
simple_value_holder[1 +instance_simple_holder_in_ptrs()]
-
nonsimple_values_and_holders
nonsimple
-
PyObject_HEAD union instance::@0 @1 Storage for pointers and holder; see simple_layout, below, for a description.
-
PyObject *
weakrefs Weak references.
-
bool
owned If true, the pointer is owned which means we’re free to manage it with a holder.
-
bool
simple_layout An instance has two possible value/holder layouts.
Simple layout (when this flag is true), means the
simple_value_holderis set with a pointer and the holder object governing that pointer, i.e. [val1*][holder]. This layout is applied whenever there is no python-side multiple inheritance of bound C++ types and the type’s holder will fit in the default space (which is large enough to hold either a std::unique_ptr or std::shared_ptr).Non-simple layout applies when using custom holders that require more space than
shared_ptr(which is typically the size of two pointers), or when multiple inheritance is used on the python side. Non-simple layout allocates the required amount of memory to have multiple bound C++ classes as parents. Under this layout,nonsimple.values_and_holdersis set to a pointer to allocated space of the required space to hold a sequence of value pointers and holders followedstatus, a set of bit flags (1 byte each), i.e. [val1*][holder1][val2*][holder2]…[bb…] where each [block] is rounded up to a multiple ofsizeof(void *).nonsimple.statusis, for convenience, a pointer to the beginning of the [bb…] block (but not independently allocated).Status bits indicate whether the associated holder is constructed (& status_holder_constructed) and whether the value pointer is registered (& status_instance_registered) in
registered_instances.
-
bool
simple_holder_constructed For simple layout, tracks whether the holder has been constructed.
-
bool
simple_instance_registered For simple layout, tracks whether the instance is registered in
registered_instances
-
bool
has_patients If true, get_internals().patients has an entry for this object.
-
PyObject_HEAD union instance::@5 @6 Storage for pointers and holder; see simple_layout, below, for a description.
Public Static Attributes
-
static constexpr uint8_t
status_holder_constructed= 1 Bit values for the non-simple status flags.
-
static constexpr uint8_t
status_instance_registered= 2
-
inline void
-
class
InstantiationInMultipleTranslationUnitsTest: public testing::TestWithParam<int> - #include <googletest-param-test-test.h>
-
class
Interface - #include <gmock_link_test.h>
Subclassed by Mock
Public Functions
-
inline virtual
~Interface()
-
virtual void
VoidFromString(char *str) = 0
-
virtual char *
StringFromString(char *str) = 0
-
virtual int
IntFromString(char *str) = 0
-
virtual int &
IntRefFromString(char *str) = 0
-
virtual void
VoidFromFunc(void (*func)(char *str)) = 0
-
virtual void
VoidFromIntRef(int &n) = 0
-
virtual void
VoidFromFloat(float n) = 0
-
virtual void
VoidFromDouble(double n) = 0
-
virtual void
VoidFromVector(const std::vector<int> &v) = 0
-
inline virtual
-
struct
internals - #include <internals.h>
Internal data structure used to track registered instances and types.
Whenever binary incompatible changes are made to this structure,
PYBIND11_INTERNALS_VERSIONmust be incremented.Public Members
-
std::unordered_map<PyTypeObject*, std::vector<type_info*>>
registered_types_py
-
std::unordered_multimap<const void*, instance*>
registered_instances
-
std::unordered_set<std::pair<const PyObject*, const char*>, overload_hash>
inactive_overload_cache
-
type_map<std::vector<bool (*)(PyObject*, void*&)>>
direct_conversions
-
std::unordered_map<const PyObject*, std::vector<PyObject*>>
patients
-
std::forward_list<void (*)(std::exception_ptr)>
registered_exception_translators
-
std::vector<PyObject*>
loader_patient_stack
-
std::forward_list<std::string>
static_strings
-
PyTypeObject *
static_property_type
-
PyTypeObject *
default_metaclass
-
PyObject *
instance_base
-
std::unordered_map<PyTypeObject*, std::vector<type_info*>>
-
template<typename
T>
structintrinsic_type - #include <common.h>
Helper template to strip away type modifiers.
-
template<typename
T>
structintrinsic_type<const T> - #include <common.h>
-
template<typename
T>
structintrinsic_type<T&> - #include <common.h>
-
template<typename
T>
structintrinsic_type<T&&> - #include <common.h>
-
template<typename
T>
structintrinsic_type<T*> - #include <common.h>
-
class
IntWrapper Public Functions
-
inline explicit
IntWrapper(int a_value)
-
inline
IntWrapper(const IntWrapper &other)
-
inline IntWrapper
operator=(const IntWrapper &other)
-
inline IntWrapper
operator+(int other) const
-
inline bool
operator<(const IntWrapper &other) const
-
inline int
value() const
Private Members
-
int
value_
-
inline explicit
-
template<std::size_t
index, typename ...Params>
structtesting::internal::InvokeArgumentAction - #include <gmock-more-actions.h>
-
class
InvokeHelper - #include <gmock_link_test.h>
Public Functions
-
inline void
VoidFromVoid()
-
inline void
VoidFromString(char*)
Public Static Functions
-
static inline void
StaticVoidFromVoid()
-
static inline void
StaticVoidFromString(char*)
-
static inline int
StaticIntFromString(char*)
-
static inline bool
StaticBoolFromString(const char*)
-
inline void
-
template<class
Class, typenameMethodPtr>
structtesting::internal::InvokeMethodAction - #include <gmock-actions.h>
Public Functions
-
template<typename... Args> inline auto operator() (Args &&... args) const -> decltype((obj_ptr-> *method_ptr)(std::forward< Args >(args)...))
-
template<typename... Args> inline auto operator() (Args &&... args) const -> decltype((obj_ptr-> *method_ptr)(std::forward< Args >(args)...))
-
-
template<class
Class, typenameMethodPtr>
structtesting::internal::InvokeMethodWithoutArgsAction - #include <gmock-actions.h>
Public Types
-
ReturnType = decltype((std::declval< Class * >() -> *std::declval< MethodPtr >())())
-
ReturnType = decltype((std::declval< Class * >() -> *std::declval< MethodPtr >())())
-
-
template<typename
FunctionImpl>
structtesting::internal::InvokeWithoutArgsAction - #include <gmock-actions.h>
Public Functions
-
template<typename ...
Args>
inline autooperator()(const Args&...) -> decltype(function_impl())
-
template<typename ...
Args>
inline autooperator()(const Args&...) -> decltype(function_impl())
Public Members
-
FunctionImpl
function_impl
-
template<typename ...
-
template<typename
T, typenameSFINAE= void>
structis_comparable: public false_type, public false_type - #include <stl_bind.h>
-
template<typename
T>
structis_comparable<T, enable_if_t<container_traits<T>::is_element && container_traits<T>::is_comparable>> : public true_type, public true_type - #include <stl_bind.h>
-
template<typename
T>
structis_comparable<T, enable_if_t<container_traits<T>::is_pair>> - #include <stl_bind.h>
-
template<typename
T>
structis_comparable<T, enable_if_t<container_traits<T>::is_vector>> - #include <stl_bind.h>
Public Static Attributes
-
static constexpr const bool
value= is_comparable<typename T::value_type>::value
-
static constexpr const bool
-
template<typename
T>
structis_complex: public false_type, public false_type - #include <numpy.h>
-
template<typename
T>
structis_complex<std::complex<T>> : public true_type, public true_type - #include <numpy.h>
-
template<typename
T, typenameSFINAE= void>
structis_copy_assignable: public std::is_copy_assignable<T>, public std::is_copy_assignable<T> - #include <cast.h>
-
template<typename
Container>
structis_copy_assignable<Container, enable_if_t<all_of<std::is_copy_assignable<Container>, std::is_same<typename Container::value_type&, typename Container::reference>>::value>> : public is_copy_assignable<Container::value_type>, public is_copy_assignable<Container::value_type> - #include <cast.h>
-
template<typename
T1, typenameT2>
structis_copy_assignable<std::pair<T1, T2>> : public all_of<is_copy_assignable<T1>, is_copy_assignable<T2>>, public all_of<is_copy_assignable<T1>, is_copy_assignable<T2>> - #include <cast.h>
-
template<typename
T, typenameSFINAE= void>
structis_copy_constructible: public std::is_copy_constructible<T>, public std::is_copy_constructible<T> - #include <cast.h>
-
template<typename
Container>
structis_copy_constructible<Container, enable_if_t<all_of<std::is_copy_constructible<Container>, std::is_same<typename Container::value_type&, typename Container::reference>, negation<std::is_same<Container, typename Container::value_type>>>::value>> : public is_copy_constructible<Container::value_type>, public is_copy_constructible<Container::value_type> - #include <cast.h>
-
template<typename
T1, typenameT2>
structis_copy_constructible<std::pair<T1, T2>> : public all_of<is_copy_constructible<T1>, is_copy_constructible<T2>>, public all_of<is_copy_constructible<T1>, is_copy_constructible<T2>> - #include <cast.h>
-
template<typename
T, typenameSFINAE= void>
structis_fmt_numeric - #include <common.h>
Public Static Attributes
-
static constexpr bool
value= false
-
static constexpr bool
-
template<typename
T>
structis_fmt_numeric<std::complex<T>, detail::enable_if_t<std::is_floating_point<T>::value>> - #include <complex.h>
Public Static Attributes
-
static constexpr bool
value= true
-
static constexpr int
index= is_fmt_numeric<T>::index + 3
-
static constexpr bool
-
template<typename
T>
structis_fmt_numeric<T, enable_if_t<std::is_arithmetic<T>::value>> - #include <common.h>
Public Static Attributes
-
static constexpr bool
value= true
-
static constexpr int index = std::is_same<T, bool>::value? 0 : 1 + (std::is_integral<T>::value ? detail::log2(sizeof(T))*2 + std::is_unsigned<T>::value: 8 + (std::is_same<T, double>::value ? 1 : std::is_same<T, long double>::value ? 2 : 0))
-
static constexpr bool
-
template<typename
base, typenameholder>
structis_holder_type: public std::is_base_of<detail::type_caster_holder<base, holder>, detail::type_caster<holder>>, public std::is_base_of<detail::type_caster_holder<base, holder>, detail::type_caster<holder>> - #include <cast.h>
-
template<typename
base, typenamedeleter>
structis_holder_type<base, std::unique_ptr<base, deleter>> : public true_type, public true_type - #include <cast.h>
-
template<typename
T, typename = void>
structis_input_iterator: public false_type, public false_type - #include <common.h>
Check if T looks like an input iterator.
-
template<typename
T>
structis_input_iterator<T, void_t<decltype(*std::declval<T&>()), decltype(++std::declval<T&>())>> : public true_type, public true_type - #include <common.h>
-
template<template<typename...> class
Class, typenameT>
structis_instantiation: public false_type, public false_type - #include <common.h>
Check if T is an instantiation of the template
Class.For example:
is_instantiation<shared_ptr, T>is true ifT == shared_ptr<U>where U can be anything.
-
template<template<typename...> class
Class, typename ...Us>
structis_instantiation<Class, Class<Us...>> : public true_type, public true_type - #include <common.h>
-
struct
is_method - #include <attr.h>
Annotation for methods.
Public Members
-
handle
class_
-
handle
-
struct
is_new_style_constructor - #include <attr.h>
Tag for a new-style
__init__defined indetail/init.h
-
struct
is_operator - #include <attr.h>
Annotation for operators.
-
template<typename
T>
structis_std_array: public false_type, public false_type - #include <numpy.h>
-
template<typename
T, size_tN>
structis_std_array<std::array<T, N>> : public true_type, public true_type - #include <numpy.h>
-
template<template<typename...> class
Base>
structis_template_base_of_impl - #include <common.h>
-
template<typename
T>
structis_valid_class_option: public detail::any_of<is_holder<T>, is_subtype<T>, is_base<T>>, public detail::any_of<is_holder<T>, is_subtype<T>, is_base<T>>
-
struct
values_and_holders::iterator - #include <cast.h>
Public Functions
-
inline bool
operator==(const iterator &other)
-
inline bool
operator!=(const iterator &other)
-
inline iterator &
operator++()
-
inline value_and_holder &
operator*()
-
inline value_and_holder *
operator->()
-
inline bool
operator==(const iterator &other)
-
inline bool
operator!=(const iterator &other)
-
inline iterator &
operator++()
-
inline value_and_holder &
operator*()
-
inline value_and_holder *
operator->()
Friends
- friend struct values_and_holders
-
inline bool
-
struct
testing::gtest_printers_test::iterator Public Members
-
char
x
-
char
-
class
iterator: public object, public object - #include <pytypes.h>
Wraps a Python iterator so that it can also be used as a C++ input iterator
Caveat: copying an iterator does not (and cannot) clone the internal state of the Python iterable. This also applies to the post-increment operator. This iterator should only be used to retrieve the current value using
operator*().Public Types
-
using
iterator_category= std::input_iterator_tag
-
using
difference_type= ssize_t
-
using
value_type= handle
-
using
reference= const handle
-
using
pointer= const handle*
-
using
iterator_category= std::input_iterator_tag
-
using
difference_type= ssize_t
-
using
value_type= handle
-
using
reference= const handle
-
using
pointer= const handle*
Public Functions
-
inline iterator &
operator++()
-
inline iterator
operator++(int)
-
inline reference
operator*() const
-
inline pointer
operator->() const
-
inline iterator &
operator++()
-
inline iterator
operator++(int)
-
inline reference
operator*() const
-
inline pointer
operator->() const
Public Static Functions
-
static inline iterator
sentinel() The value which marks the end of the iteration.
it == iterator::sentinel()is equivalent to catchingStopIterationin Python... code-block:: cpp
usevoid foo(py::iterator it) { while (it != py::iterator::sentinel()) {
*it++it; } }
-
static inline iterator
sentinel() The value which marks the end of the iteration.
it == iterator::sentinel()is equivalent to catchingStopIterationin Python... code-block:: cpp
usevoid foo(py::iterator it) { while (it != py::iterator::sentinel()) {
*it++it; } }
Private Functions
-
inline void
advance()
-
inline void
advance()
Private Members
-
object
value= {}
Friends
-
inline friend friend bool operator== (const iterator &a, const iterator &b)
-
inline friend friend bool operator!= (const iterator &a, const iterator &b)
-
inline friend friend bool operator== (const iterator &a, const iterator &b)
-
inline friend friend bool operator!= (const iterator &a, const iterator &b)
-
using
-
template<typename
Iterator, typenameSentinel, boolKeyIterator, return_value_policyPolicy>
structiterator_state - #include <pybind11.h>
-
class
testing::internal::JsonUnitTestResultPrinter: public testing::EmptyTestEventListener Public Functions
-
explicit
JsonUnitTestResultPrinter(const char *output_file)
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) override
Public Static Functions
-
static void
PrintJsonTestList(::std::ostream *stream, const std::vector<TestSuite*> &test_suites)
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(JsonUnitTestResultPrinter)
Private Members
-
const std::string
output_file_
Private Static Functions
-
static std::string
EscapeJson(const std::string &str)
-
static void
OutputJsonKey(std::ostream *stream, const std::string &element_name, const std::string &name, const std::string &value, const std::string &indent, bool comma = true)
-
static void
OutputJsonKey(std::ostream *stream, const std::string &element_name, const std::string &name, int value, const std::string &indent, bool comma = true)
-
static void
OutputJsonTestSuiteForTestResult(::std::ostream *stream, const TestResult &result)
-
static void
OutputJsonTestResult(::std::ostream *stream, const TestResult &result)
-
static void
OutputJsonTestInfo(::std::ostream *stream, const char *test_suite_name, const TestInfo &test_info)
-
static void
PrintJsonTestSuite(::std::ostream *stream, const TestSuite &test_suite)
-
static void
PrintJsonUnitTest(::std::ostream *stream, const UnitTest &unit_test)
-
static std::string
TestPropertiesAsJson(const TestResult &result, const std::string &indent)
-
explicit
-
template<size_t
Nurse, size_tPatient>
structkeep_alive - #include <attr.h>
Keep patient alive while nurse lives.
-
class
testing::gmock_function_mocker_test::LegacyMockB Public Functions
-
inline
LegacyMockB()
-
MOCK_METHOD0(DoB, void())
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockB)
-
inline
-
class
testing::gmock_function_mocker_test::LegacyMockFoo: public testing::gmock_function_mocker_test::FooInterface Public Functions
-
inline
LegacyMockFoo()
-
MOCK_METHOD1(VoidReturning, void(int n))
-
MOCK_METHOD0(Nullary, int())
-
MOCK_METHOD1(Unary, bool(int))
-
MOCK_METHOD2(Binary, long(short, int))
-
MOCK_METHOD10(Decimal, int(bool, char, short, int, long, float, double, unsigned, char*, const std::string &str))
-
MOCK_METHOD1(TakesNonConstReference, bool(int&))
-
MOCK_METHOD1(TakesConstReference, std::string(const int&))
-
MOCK_METHOD1(TakesConst, bool(const int))
-
MOCK_METHOD0(ReturnTypeWithComma, std::map<int, std::string>())
-
MOCK_CONST_METHOD1(ReturnTypeWithComma, std::map<int, std::string>(int))
-
MOCK_METHOD0(OverloadedOnArgumentNumber, int())
-
MOCK_METHOD1(OverloadedOnArgumentNumber, int(int))
-
MOCK_METHOD1(OverloadedOnArgumentType, int(int))
-
MOCK_METHOD1(OverloadedOnArgumentType, char(char))
-
MOCK_METHOD0(OverloadedOnConstness, int())
-
MOCK_CONST_METHOD0(OverloadedOnConstness, char())
-
MOCK_METHOD1(TypeWithHole, int(int (*)()))
-
MOCK_METHOD1(TypeWithComma, int(const std::map<int, std::string>&))
-
MOCK_METHOD1(TypeWithTemplatedCopyCtor, int(const TemplatedCopyable<int>&))
-
MOCK_METHOD1(ReturnsFunctionPointer1, int (*(int))(bool))
-
MOCK_METHOD1(ReturnsFunctionPointer2, fn_ptr(int))
-
inline virtual int
RefQualifiedConstRef() const & override
-
inline virtual int
RefQualifiedConstRefRef() const && override
-
inline virtual int
RefQualifiedRef() & override
-
inline virtual int
RefQualifiedRefRef() && override
-
inline virtual int
RefQualifiedOverloaded() const & override
-
inline virtual int
RefQualifiedOverloaded() const && override
-
inline virtual int
RefQualifiedOverloaded() & override
-
inline virtual int
RefQualifiedOverloaded() && override
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockFoo)
-
inline
-
struct
testing::gmock_function_mocker_test::LegacyMockMethodSizes0 Public Functions
-
MOCK_METHOD0(func, void())
-
-
struct
testing::gmock_function_mocker_test::LegacyMockMethodSizes1 Public Functions
-
MOCK_METHOD1(func, void(int))
-
-
struct
testing::gmock_function_mocker_test::LegacyMockMethodSizes2 Public Functions
-
MOCK_METHOD2(func, void(int, int))
-
-
struct
testing::gmock_function_mocker_test::LegacyMockMethodSizes3 Public Functions
-
MOCK_METHOD3(func, void(int, int, int))
-
-
struct
testing::gmock_function_mocker_test::LegacyMockMethodSizes4 Public Functions
-
MOCK_METHOD4(func, void(int, int, int, int))
-
-
class
testing::gmock_function_mocker_test::LegacyMockOverloadedOnArgNumber Public Functions
-
inline
LegacyMockOverloadedOnArgNumber()
Public Members
-
LEGACY_MY_MOCK_METHODS1_
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockOverloadedOnArgNumber)
-
inline
-
template<typename
T>
classtesting::gmock_function_mocker_test::LegacyMockStack: public testing::gmock_function_mocker_test::StackInterface<T> Public Functions
-
inline
LegacyMockStack()
-
MOCK_METHOD1_T(Push, void(const T &elem))
-
MOCK_METHOD0_T(Pop, void())
-
MOCK_CONST_METHOD0_T(GetSize, int())
-
MOCK_CONST_METHOD0_T(GetTop, const T&())
-
MOCK_METHOD0_T(ReturnTypeWithComma, std::map<int, int>())
-
MOCK_CONST_METHOD1_T(ReturnTypeWithComma, std::map<int, int>(int))
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(LegacyMockStack)
-
inline
-
class
list: public object, public object - #include <pytypes.h>
Public Functions
-
inline explicit
list(size_t size = 0)
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::list_accessor
operator[](size_t index) const
-
inline detail::item_accessor
operator[](handle h) const
-
inline detail::list_iterator
begin() const
-
inline detail::list_iterator
end() const
-
template<typename
T>
inline voidappend(T &&val) const
-
inline explicit
list(size_t size = 0)
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::list_accessor
operator[](size_t index) const
-
inline detail::item_accessor
operator[](handle h) const
-
inline detail::list_iterator
begin() const
-
inline detail::list_iterator
end() const
-
template<typename
T>
inline voidappend(T &&val) const
-
inline explicit
-
template<typename
Type, typenameValue>
structlist_caster - #include <stl.h>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (Type, _("List[")+value_conv::name+_("]"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (Type, _("List[")+value_conv::name+_("]"))
Public Static Functions
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
Private Functions
-
template<typename
T= Type, enable_if_t<std::is_same<decltype(std::declval<T>().reserve(0)), void>::value, int> = 0>
inline voidreserve_maybe(sequence s, Type*)
-
inline void
reserve_maybe(sequence, void*)
-
template<typename
T= Type, enable_if_t<std::is_same<decltype(std::declval<T>().reserve(0)), void>::value, int> = 0>
inline voidreserve_maybe(sequence s, Type*)
-
inline void
reserve_maybe(sequence, void*)
-
inline bool
-
struct
list_item - #include <pytypes.h>
-
class
testing::internal::ListenerTest: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
-
inline virtual void
-
class
loader_life_support - #include <cast.h>
A life support system for temporary objects created by
type_caster::load().Adding a patient will keep it alive up until the enclosing function returns.
Public Functions
-
inline
loader_life_support() A new patient frame is created when a function is entered.
-
inline
~loader_life_support() … and destroyed after it returns
-
inline
loader_life_support() A new patient frame is created when a function is entered.
-
inline
~loader_life_support() … and destroyed after it returns
Public Static Functions
-
static inline PYBIND11_NOINLINE void add_patient (handle h) This can only be used inside a pybind11-bound function, either by
argument_loaderat argument preparation time or bypy::cast()at execution time.
-
static inline PYBIND11_NOINLINE void add_patient (handle h) This can only be used inside a pybind11-bound function, either by
argument_loaderat argument preparation time or bypy::cast()at execution time.
-
inline
-
struct
LookupBlocker - #include <gtest-printers.h>
-
class
MacroNamingTest: public testing::TestWithParam<int>
-
template<typename
Type, typenameKey, typenameValue>
structmap_caster - #include <stl.h>
Public Types
-
using
key_conv= make_caster<Key>
-
using
value_conv= make_caster<Value>
-
using
key_conv= make_caster<Key>
-
using
value_conv= make_caster<Value>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (Type, _("Dict[")+key_conv::name+_(", ")+value_conv::name+_("]"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (Type, _("Dict[")+key_conv::name+_(", ")+value_conv::name+_("]"))
Public Static Functions
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
using
-
class
testing::internal::MaxBipartiteMatchState Public Functions
-
inline explicit
MaxBipartiteMatchState(const MatchMatrix &graph)
-
inline ElementMatcherPairs
Compute()
Private Functions
-
inline bool
TryAugment(size_t ilhs, ::std::vector<char> *seen)
-
inline explicit
-
class
memoryview: public object, public object - #include <pytypes.h>
Public Functions
-
inline explicit
memoryview(const buffer_info &info)
-
inline explicit
memoryview(const buffer_info &info)
-
inline explicit
-
class
Message
-
class
testing::Message - #include <gtest-message.h>
Public Functions
-
Message()
-
inline
Message(const Message &msg)
-
inline explicit
Message(const char *str)
-
inline Message &
operator<<(BasicNarrowIoManip val)
-
inline Message &
operator<<(bool b)
-
Message &
operator<<(const wchar_t *wide_c_str)
-
Message &
operator<<(wchar_t *wide_c_str)
-
std::string
GetString() const
-
Message()
-
inline
Message(const Message &msg)
-
inline explicit
Message(const char *str)
-
inline Message &
operator<<(BasicNarrowIoManip val)
-
inline Message &
operator<<(bool b)
-
Message &
operator<<(const wchar_t *wide_c_str)
-
Message &
operator<<(wchar_t *wide_c_str)
-
std::string
GetString() const
Private Types
-
typedef std::ostream &(*
BasicNarrowIoManip)(std::ostream&)
-
typedef std::ostream &(*
BasicNarrowIoManip)(std::ostream&)
Private Members
-
const std::unique_ptr<::std::stringstream>
ss_
-
-
struct
metaclass - #include <attr.h>
Annotation which requests that a special metaclass is created for a type.
Public Functions
-
inline
metaclass()
-
inline explicit
metaclass(handle value) Override pybind11’s default metaclass.
-
inline
metaclass()
-
inline explicit
metaclass(handle value) Override pybind11’s default metaclass.
Public Members
-
handle
value
-
inline
-
struct
MissingDebugStringMethod Public Functions
-
inline std::string
DebugString()
-
inline std::string
-
class
Mock: public Interface - #include <gmock_link_test.h>
Public Functions
-
inline
Mock()
-
MOCK_METHOD0(DoThis, void())
-
inline
Mock()
-
MOCK_METHOD1(VoidFromString, void(char *str))
-
MOCK_METHOD1(StringFromString, char*(char *str))
-
MOCK_METHOD1(IntFromString, int(char *str))
-
MOCK_METHOD1(IntRefFromString, int&(char *str))
-
MOCK_METHOD1(VoidFromFunc, void(void (*func)(char *str)))
-
MOCK_METHOD1(VoidFromIntRef, void(int &n))
-
MOCK_METHOD1(VoidFromFloat, void(float n))
-
MOCK_METHOD1(VoidFromDouble, void(double n))
-
MOCK_METHOD1(VoidFromVector, void(const std::vector<int> &v))
-
inline
-
class
testing::gmock_function_mocker_test::MockB Public Functions
-
inline
MockB()
-
MOCK_METHOD (void, DoB,())
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB)
-
inline
-
class
testing::gmock_nice_strict_test::MockBar Public Functions
-
inline explicit
MockBar(const std::string &s)
-
inline
MockBar(char a1, char a2, std::string a3, std::string a4, int a5, int a6, const std::string &a7, const std::string &a8, bool a9, bool a10)
-
inline virtual
~MockBar()
-
inline const std::string &
str() const
-
MOCK_METHOD0(This, int())
-
MOCK_METHOD2(That, std::string(int, bool))
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar)
Private Members
-
std::string
str_
-
inline explicit
-
class
testing::gmock_nice_strict_test::MockBaz Public Functions
-
inline
MockBaz(MoveOnly)
-
inline
-
class
testing::gmock_nice_strict_test::MockFoo: public testing::gmock_nice_strict_test::Foo Public Functions
-
inline
MockFoo()
-
inline void
Delete()
-
MOCK_METHOD0(DoThis, void())
-
MOCK_METHOD1(DoThat, int(bool flag))
-
MOCK_METHOD0(ReturnNonDefaultConstructible, NotDefaultConstructible())
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo)
-
inline
-
class
MockFoo: public FooInterface Public Functions
-
inline
MockFoo()
-
MOCK_METHOD3(Bar, char(const std::string &s, int i, double x))
-
MOCK_METHOD2(Bar2, bool(int x, int y))
-
MOCK_METHOD2(Bar3, void(int x, int y))
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo)
-
inline
-
class
testing::gmock_function_mocker_test::MockFoo: public testing::gmock_function_mocker_test::FooInterface Public Functions
-
inline
MockFoo()
-
MOCK_METHOD (void, VoidReturning,(int n))
-
MOCK_METHOD (int, Nullary,())
-
MOCK_METHOD (bool, Unary,(int))
-
MOCK_METHOD (long, Binary,(short, int))
-
MOCK_METHOD (int, Decimal,(bool, char, short, int, long, float, double, unsigned, char *, const std::string &str),(override))
-
MOCK_METHOD (bool, TakesNonConstReference,(int &))
-
MOCK_METHOD (std::string, TakesConstReference,(const int &))
-
MOCK_METHOD (bool, TakesConst,(const int))
-
MOCK_METHOD ((std::map< int, std::string >), ReturnTypeWithComma,(),())
-
MOCK_METHOD ((std::map< int, std::string >), ReturnTypeWithComma,(int),(const))
-
MOCK_METHOD (int, OverloadedOnArgumentNumber,())
-
MOCK_METHOD (int, OverloadedOnArgumentNumber,(int))
-
MOCK_METHOD (int, OverloadedOnArgumentType,(int))
-
MOCK_METHOD (char, OverloadedOnArgumentType,(char))
-
MOCK_METHOD (int, OverloadedOnConstness,(),(override))
-
MOCK_METHOD (char, OverloadedOnConstness,(),(override, const))
-
MOCK_METHOD (int, TypeWithHole,(int(*)()),())
-
MOCK_METHOD (int, TypeWithComma,((const std::map< int, std::string > &)))
-
MOCK_METHOD (int, TypeWithTemplatedCopyCtor,(const TemplatedCopyable< int > &))
-
MOCK_METHOD (int(*)(bool), ReturnsFunctionPointer1,(int),())
-
MOCK_METHOD (fn_ptr, ReturnsFunctionPointer2,(int),())
-
MOCK_METHOD (int, RefQualifiedConstRef,(),(const, ref(&), override))
-
MOCK_METHOD (int, RefQualifiedConstRefRef,(),(const, ref(&&), override))
-
MOCK_METHOD (int, RefQualifiedRef,(),(ref(&), override))
-
MOCK_METHOD (int, RefQualifiedRefRef,(),(ref(&&), override))
-
MOCK_METHOD (int, RefQualifiedOverloaded,(),(const, ref(&), override))
-
MOCK_METHOD (int, RefQualifiedOverloaded,(),(const, ref(&&), override))
-
MOCK_METHOD (int, RefQualifiedOverloaded,(),(ref(&), override))
-
MOCK_METHOD (int, RefQualifiedOverloaded,(),(ref(&&), override))
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo)
-
inline
-
struct
testing::gmock_function_mocker_test::MockMethodNoexceptSpecifier Public Functions
-
MOCK_METHOD (void, func1,(),(noexcept))
-
MOCK_METHOD (void, func2,(),(noexcept(true)))
-
MOCK_METHOD (void, func3,(),(noexcept(false)))
-
MOCK_METHOD (void, func4,(),(noexcept(noexcept(MaybeThrows()))))
-
MOCK_METHOD (void, func5,(),(noexcept(noexcept(DoesntThrow()))))
-
MOCK_METHOD (void, func6,(),(noexcept(noexcept(DoesntThrow())), const))
-
MOCK_METHOD (void, func7,(),(const, noexcept(noexcept(DoesntThrow()))))
-
MOCK_METHOD (void, func8,(),(noexcept(noexcept(hasTwoParams(1, 2))), const))
-
-
struct
testing::gmock_function_mocker_test::MockMethodSizes0 Public Functions
-
MOCK_METHOD (void, func,())
-
-
struct
testing::gmock_function_mocker_test::MockMethodSizes1 Public Functions
-
MOCK_METHOD (void, func,(int))
-
-
struct
testing::gmock_function_mocker_test::MockMethodSizes2 Public Functions
-
MOCK_METHOD (void, func,(int, int))
-
-
struct
testing::gmock_function_mocker_test::MockMethodSizes3 Public Functions
-
MOCK_METHOD (void, func,(int, int, int))
-
-
struct
testing::gmock_function_mocker_test::MockMethodSizes4 Public Functions
-
MOCK_METHOD (void, func,(int, int, int, int))
-
-
class
testing::gmock_function_mocker_test::MockOverloadedOnArgNumber Public Functions
-
inline
MockOverloadedOnArgNumber()
Public Members
-
MY_MOCK_METHODS1_
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnArgNumber)
-
inline
-
class
testing::gmock_function_mocker_test::MockOverloadedOnConstness Public Functions
-
inline
MockOverloadedOnConstness()
Public Members
-
MY_MOCK_METHODS2_
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockOverloadedOnConstness)
-
inline
-
template<typename
T>
classtesting::gmock_function_mocker_test::MockStack: public testing::gmock_function_mocker_test::StackInterface<T> Public Functions
-
inline
MockStack()
-
MOCK_METHOD (void, Push,(const T &elem),())
-
MOCK_METHOD (void, Pop,(),(final))
-
MOCK_METHOD (int, GetSize,(),(const, override))
-
MOCK_METHOD (const T &, GetTop,(),(const))
-
MOCK_METHOD ((std::map< int, int >), ReturnTypeWithComma,(),())
-
MOCK_METHOD ((std::map< int, int >), ReturnTypeWithComma,(int),(const))
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockStack)
-
inline
-
class
module: public object, public object - #include <pybind11.h>
Wrapper for Python extension modules.
Public Functions
-
inline explicit
module(const char *name, const char *doc = nullptr) Create a new top-level Python module with the given name and docstring.
-
template<typename
Func, typename ...Extra>
inline module &def(const char *name_, Func &&f, const Extra&... extra) Create Python binding for a new function within the module scope.
Funccan be a plain C++ function, a function pointer, or a lambda function. For details on theExtra&& ... extraargument, see section :ref:extras.
-
inline module
def_submodule(const char *name, const char *doc = nullptr) Create and return a new Python submodule with the given name and docstring.
This also works recursively, i.e.
.. code-block:: cpp
py::module m("example", "pybind11 example plugin"); py::module m2 = m.def_submodule("sub", "A submodule of 'example'"); py::module m3 = m2.def_submodule("subsub", "A submodule of 'example.sub'");
-
inline void
reload() Reload the module or throws
error_already_set.
-
inline PYBIND11_NOINLINE void add_object (const char *name, handle obj, bool overwrite=false)
-
inline explicit
module(const char *name, const char *doc = nullptr) Create a new top-level Python module with the given name and docstring.
-
template<typename
Func, typename ...Extra>
inline module &def(const char *name_, Func &&f, const Extra&... extra) Create Python binding for a new function within the module scope.
Funccan be a plain C++ function, a function pointer, or a lambda function. For details on theExtra&& ... extraargument, see section :ref:extras.
-
inline module
def_submodule(const char *name, const char *doc = nullptr) Create and return a new Python submodule with the given name and docstring.
This also works recursively, i.e.
.. code-block:: cpp
py::module m("example", "pybind11 example plugin"); py::module m2 = m.def_submodule("sub", "A submodule of 'example'"); py::module m3 = m2.def_submodule("subsub", "A submodule of 'example.sub'");
-
inline void
reload() Reload the module or throws
error_already_set.
-
inline PYBIND11_NOINLINE void add_object (const char *name, handle obj, bool overwrite=false)
Public Static Functions
-
static inline module
import(const char *name) Import and return a module or throws
error_already_set.
-
static inline module
import(const char *name) Import and return a module or throws
error_already_set.
-
inline explicit
-
struct
module_local - #include <attr.h>
Annotation that marks a class as local to the module:
Public Functions
-
inline constexpr
module_local(bool v = true)
-
inline constexpr
module_local(bool v = true)
Public Members
-
const bool
value
-
inline constexpr
-
template<typename
F>
classtesting::PolymorphicAction::MonomorphicImpl: public testing::ActionInterface<F>, public testing::ActionInterface<F> Public Types
Public Functions
-
inline explicit
MonomorphicImpl(const Impl &impl)
-
inline virtual Result
Perform(const ArgumentTuple &args) override
-
inline explicit
MonomorphicImpl(const Impl &impl)
-
inline virtual Result
Perform(const ArgumentTuple &args) override
Private Members
-
Impl
impl_
-
inline explicit
-
template<class
T>
structMovableEigenMatrix - #include <yaml_eigen.hpp>
-
template<class
T>
structMovableEigenVector - #include <yaml_eigen.hpp>
-
template<typename
T, typenameSFINAE= void>
structmove_always: public false_type, public false_type - #include <cast.h>
-
template<typename
T>
structmove_always<T, enable_if_t<all_of<move_is_plain_type<T>, negation<is_copy_constructible<T>>, std::is_move_constructible<T>, std::is_same<decltype(std::declval<make_caster<T>>().operator T&()), T&>>::value>> : public true_type, public true_type - #include <cast.h>
-
template<typename
T, typenameSFINAE= void>
structmove_if_unreferenced: public false_type, public false_type - #include <cast.h>
-
template<typename
T>
structmove_if_unreferenced<T, enable_if_t<all_of<move_is_plain_type<T>, negation<move_always<T>>, std::is_move_constructible<T>, std::is_same<decltype(std::declval<make_caster<T>>().operator T&()), T&>>::value>> : public true_type, public true_type - #include <cast.h>
-
template<typename
type, typenameholder_type>
structmove_only_holder_caster - #include <cast.h>
Public Static Functions
-
static inline handle
cast(holder_type &&src, return_value_policy, handle)
-
static inline handle
cast(holder_type &&src, return_value_policy, handle)
Public Static Attributes
-
static constexpr auto
name= type_caster_base<type>::name
-
static inline handle
-
class
testing::gmock_nice_strict_test::MockBaz::MoveOnly
-
template<size_t
N>
classmulti_array_iterator - #include <numpy.h>
Public Types
-
using
container_type= std::vector<ssize_t>
-
using
container_type= std::vector<ssize_t>
Public Functions
-
inline
multi_array_iterator(const std::array<buffer_info, N> &buffers, const container_type &shape)
-
inline multi_array_iterator &
operator++()
-
inline
multi_array_iterator(const std::array<buffer_info, N> &buffers, const container_type &shape)
-
inline multi_array_iterator &
operator++()
Private Functions
-
inline void
init_common_iterator(const buffer_info &buffer, const container_type &shape, common_iter &iterator, container_type &strides)
-
inline void
increment_common_iterator(size_t dim)
-
inline void
init_common_iterator(const buffer_info &buffer, const container_type &shape, common_iter &iterator, container_type &strides)
-
inline void
increment_common_iterator(size_t dim)
Private Members
-
container_type
m_shape
-
container_type
m_index
-
std::array<common_iter, N>
m_common_iterator
-
using
-
struct
multiple_inheritance - #include <attr.h>
Annotation indicating that a class is involved in a multiple inheritance relationship.
-
class
MultipleInstantiationTest: public testing::TestWithParam<int>
-
template<typename
T, intkSize>
classMyArray
-
class
MyEnumTest: public testing::TestWithParam<MyEnums>
-
template<typename
T1, typenameT2>
structMyPair
-
class
MyString - #include <sample2.h>
Public Functions
-
inline
MyString()
-
inline explicit
MyString(const char *a_c_string)
-
inline
MyString(const MyString &string)
-
inline
~MyString()
-
inline const char *
c_string() const
-
inline size_t
Length() const
-
void
Set(const char *c_string)
Public Static Functions
-
static const char *
CloneCString(const char *a_c_string)
Private Members
-
const char *
c_string_
-
inline
-
class
MyType Public Functions
-
inline explicit
MyType(const std::string &a_value)
-
inline const std::string &
value() const
Private Members
-
std::string
value_
-
inline explicit
-
class
namespace1::MyTypeInNameSpace1: public Base Public Functions
-
inline explicit
MyTypeInNameSpace1(int an_x)
-
inline explicit
-
class
namespace2::MyTypeInNameSpace2: public Base Public Functions
-
inline explicit
MyTypeInNameSpace2(int an_x)
-
inline explicit
-
template<class
MockClass>
classtesting::NaggyMock: private testing::internal::NaggyMockImpl<MockClass>, public MockClass, private testing::internal::NaggyMockImpl<MockClass>, public MockClass - #include <gmock-nice-strict.h>
-
template<typename
Base>
classtesting::internal::NaggyMockImpl - #include <gmock-nice-strict.h>
Public Functions
-
inline
NaggyMockImpl()
-
inline
~NaggyMockImpl()
-
inline
NaggyMockImpl()
-
inline
~NaggyMockImpl()
-
inline
-
struct
name - #include <attr.h>
Annotation for function names.
Public Functions
-
inline
name(const char *value)
-
inline
name(const char *value)
Public Members
-
const char *
value
-
inline
-
class
NamingTest: public testing::TestWithParam<int>
-
template<typename
T>
structnegation: public bool_constant<!T::value>, public bool_constant<!T::value> - #include <common.h>
-
template<class
MockClass>
classtesting::NiceMock: private testing::internal::NiceMockImpl<MockClass>, public MockClass, private testing::internal::NiceMockImpl<MockClass>, public MockClass - #include <gmock-nice-strict.h>
-
template<typename
Base>
classtesting::internal::NiceMockImpl - #include <gmock-nice-strict.h>
Public Functions
-
inline
NiceMockImpl()
-
inline
~NiceMockImpl()
-
inline
NiceMockImpl()
-
inline
~NiceMockImpl()
-
inline
-
class
testing::internal::NoDefaultContructor Public Functions
-
inline explicit
NoDefaultContructor(const char*)
-
inline
NoDefaultContructor(const NoDefaultContructor&)
-
inline explicit
-
struct
nodelete - #include <common.h>
Dummy destructor wrapper that can be used to expose classes with a private destructor.
-
class
NonContainer
-
class
NonDefaultConstructAssignString Public Functions
-
inline
NonDefaultConstructAssignString(const std::string &s)
-
NonDefaultConstructAssignString() = delete
-
NonDefaultConstructAssignString(const NonDefaultConstructAssignString&) = default
-
NonDefaultConstructAssignString &
operator=(const NonDefaultConstructAssignString&) = delete
-
~NonDefaultConstructAssignString() = default
-
inline const std::string &
str() const
Private Members
-
std::string
str_
-
inline
-
class
none: public object, public object - #include <pytypes.h>
Public Functions
-
inline
none()
-
inline
none()
-
inline
-
class
NonFatalFailureInFixtureConstructorTest: public testing::Test Protected Functions
-
inline
NonFatalFailureInFixtureConstructorTest()
-
inline
~NonFatalFailureInFixtureConstructorTest() override
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline
-
class
NonFatalFailureInSetUpTest: public testing::Test Protected Functions
-
inline
~NonFatalFailureInSetUpTest() override
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Private Functions
-
inline void
Deinit()
-
inline
-
class
NonParameterizedBaseTest: public testing::Test Subclassed by ParameterizedDerivedTest
Public Functions
-
inline
NonParameterizedBaseTest()
Protected Attributes
-
int
n_
-
inline
-
struct
nonsimple_values_and_holders - #include <common.h>
Public Members
-
void **
values_and_holders
-
uint8_t *
status
-
void **
-
struct
NotConstDebugStringMethod Public Functions
-
inline std::string
DebugString()
-
inline std::string
ShortDebugString() const
-
inline std::string
-
class
testing::gmock_nice_strict_test::NotDefaultConstructible Public Functions
-
inline explicit
NotDefaultConstructible(int)
-
inline explicit
-
class
NotInstantiatedTest: public testing::TestWithParam<int>
-
struct
NotReallyAHashTable Public Types
-
typedef void
hasher
-
typedef void
reverse_iterator
-
typedef void
-
class
NotUsedTest: public testing::TestWithParam<int>
-
struct
npy_api - #include <numpy.h>
Public Types
-
enum
constants Values:
-
enumerator
NPY_ARRAY_C_CONTIGUOUS_
-
enumerator
NPY_ARRAY_F_CONTIGUOUS_
-
enumerator
NPY_ARRAY_OWNDATA_
-
enumerator
NPY_ARRAY_FORCECAST_
-
enumerator
NPY_ARRAY_ENSUREARRAY_
-
enumerator
NPY_ARRAY_ALIGNED_
-
enumerator
NPY_ARRAY_WRITEABLE_
-
enumerator
NPY_BOOL_
-
enumerator
NPY_BYTE_
-
enumerator
NPY_UBYTE_
-
enumerator
NPY_SHORT_
-
enumerator
NPY_USHORT_
-
enumerator
NPY_INT_
-
enumerator
NPY_UINT_
-
enumerator
NPY_LONG_
-
enumerator
NPY_ULONG_
-
enumerator
NPY_LONGLONG_
-
enumerator
NPY_ULONGLONG_
-
enumerator
NPY_FLOAT_
-
enumerator
NPY_DOUBLE_
-
enumerator
NPY_LONGDOUBLE_
-
enumerator
NPY_CFLOAT_
-
enumerator
NPY_CDOUBLE_
-
enumerator
NPY_CLONGDOUBLE_
-
enumerator
NPY_OBJECT_
-
enumerator
NPY_STRING_
-
enumerator
NPY_UNICODE_
-
enumerator
NPY_VOID_
-
enumerator
NPY_INT8_
-
enumerator
NPY_UINT8_
-
enumerator
NPY_INT16_
-
enumerator
NPY_UINT16_
-
enumerator
NPY_INT32_
-
enumerator
NPY_UINT32_
-
enumerator
NPY_INT64_
-
enumerator
NPY_UINT64_
-
enumerator
NPY_ARRAY_C_CONTIGUOUS_
-
enumerator
NPY_ARRAY_F_CONTIGUOUS_
-
enumerator
NPY_ARRAY_OWNDATA_
-
enumerator
NPY_ARRAY_FORCECAST_
-
enumerator
NPY_ARRAY_ENSUREARRAY_
-
enumerator
NPY_ARRAY_ALIGNED_
-
enumerator
NPY_ARRAY_WRITEABLE_
-
enumerator
NPY_BOOL_
-
enumerator
NPY_BYTE_
-
enumerator
NPY_UBYTE_
-
enumerator
NPY_SHORT_
-
enumerator
NPY_USHORT_
-
enumerator
NPY_INT_
-
enumerator
NPY_UINT_
-
enumerator
NPY_LONG_
-
enumerator
NPY_ULONG_
-
enumerator
NPY_LONGLONG_
-
enumerator
NPY_ULONGLONG_
-
enumerator
NPY_FLOAT_
-
enumerator
NPY_DOUBLE_
-
enumerator
NPY_LONGDOUBLE_
-
enumerator
NPY_CFLOAT_
-
enumerator
NPY_CDOUBLE_
-
enumerator
NPY_CLONGDOUBLE_
-
enumerator
NPY_OBJECT_
-
enumerator
NPY_STRING_
-
enumerator
NPY_UNICODE_
-
enumerator
NPY_VOID_
-
enumerator
NPY_INT8_
-
enumerator
NPY_UINT8_
-
enumerator
NPY_INT16_
-
enumerator
NPY_UINT16_
-
enumerator
NPY_INT32_
-
enumerator
NPY_UINT32_
-
enumerator
NPY_INT64_
-
enumerator
NPY_UINT64_
-
enumerator
-
enum
constants Values:
-
enumerator
NPY_ARRAY_C_CONTIGUOUS_
-
enumerator
NPY_ARRAY_F_CONTIGUOUS_
-
enumerator
NPY_ARRAY_OWNDATA_
-
enumerator
NPY_ARRAY_FORCECAST_
-
enumerator
NPY_ARRAY_ENSUREARRAY_
-
enumerator
NPY_ARRAY_ALIGNED_
-
enumerator
NPY_ARRAY_WRITEABLE_
-
enumerator
NPY_BOOL_
-
enumerator
NPY_BYTE_
-
enumerator
NPY_UBYTE_
-
enumerator
NPY_SHORT_
-
enumerator
NPY_USHORT_
-
enumerator
NPY_INT_
-
enumerator
NPY_UINT_
-
enumerator
NPY_LONG_
-
enumerator
NPY_ULONG_
-
enumerator
NPY_LONGLONG_
-
enumerator
NPY_ULONGLONG_
-
enumerator
NPY_FLOAT_
-
enumerator
NPY_DOUBLE_
-
enumerator
NPY_LONGDOUBLE_
-
enumerator
NPY_CFLOAT_
-
enumerator
NPY_CDOUBLE_
-
enumerator
NPY_CLONGDOUBLE_
-
enumerator
NPY_OBJECT_
-
enumerator
NPY_STRING_
-
enumerator
NPY_UNICODE_
-
enumerator
NPY_VOID_
-
enumerator
NPY_INT8_
-
enumerator
NPY_UINT8_
-
enumerator
NPY_INT16_
-
enumerator
NPY_UINT16_
-
enumerator
NPY_INT32_
-
enumerator
NPY_UINT32_
-
enumerator
NPY_INT64_
-
enumerator
NPY_UINT64_
-
enumerator
NPY_ARRAY_C_CONTIGUOUS_
-
enumerator
NPY_ARRAY_F_CONTIGUOUS_
-
enumerator
NPY_ARRAY_OWNDATA_
-
enumerator
NPY_ARRAY_FORCECAST_
-
enumerator
NPY_ARRAY_ENSUREARRAY_
-
enumerator
NPY_ARRAY_ALIGNED_
-
enumerator
NPY_ARRAY_WRITEABLE_
-
enumerator
NPY_BOOL_
-
enumerator
NPY_BYTE_
-
enumerator
NPY_UBYTE_
-
enumerator
NPY_SHORT_
-
enumerator
NPY_USHORT_
-
enumerator
NPY_INT_
-
enumerator
NPY_UINT_
-
enumerator
NPY_LONG_
-
enumerator
NPY_ULONG_
-
enumerator
NPY_LONGLONG_
-
enumerator
NPY_ULONGLONG_
-
enumerator
NPY_FLOAT_
-
enumerator
NPY_DOUBLE_
-
enumerator
NPY_LONGDOUBLE_
-
enumerator
NPY_CFLOAT_
-
enumerator
NPY_CDOUBLE_
-
enumerator
NPY_CLONGDOUBLE_
-
enumerator
NPY_OBJECT_
-
enumerator
NPY_STRING_
-
enumerator
NPY_UNICODE_
-
enumerator
NPY_VOID_
-
enumerator
NPY_INT8_
-
enumerator
NPY_UINT8_
-
enumerator
NPY_INT16_
-
enumerator
NPY_UINT16_
-
enumerator
NPY_INT32_
-
enumerator
NPY_UINT32_
-
enumerator
NPY_INT64_
-
enumerator
NPY_UINT64_
-
enumerator
Public Functions
-
inline bool
PyArray_Check_(PyObject *obj) const
-
inline bool
PyArrayDescr_Check_(PyObject *obj) const
-
inline bool
PyArray_Check_(PyObject *obj) const
-
inline bool
PyArrayDescr_Check_(PyObject *obj) const
Public Members
-
unsigned int (*
PyArray_GetNDArrayCFeatureVersion_)()
-
PyObject *(*
PyArray_DescrFromType_)(int)
-
PyObject *(*
PyArray_NewFromDescr_)(PyTypeObject*, PyObject*, int, Py_intptr_t*, Py_intptr_t*, void*, int, PyObject*)
-
PyObject *(*
PyArray_DescrNewFromType_)(int)
-
int (*
PyArray_CopyInto_)(PyObject*, PyObject*)
-
PyObject *(*
PyArray_NewCopy_)(PyObject*, int)
-
PyTypeObject *
PyArray_Type_
-
PyTypeObject *
PyVoidArrType_Type_
-
PyTypeObject *
PyArrayDescr_Type_
-
PyObject *(*
PyArray_DescrFromScalar_)(PyObject*)
-
PyObject *(*
PyArray_FromAny_)(PyObject*, PyObject*, int, int, int, PyObject*)
-
int (*
PyArray_DescrConverter_)(PyObject*, PyObject**)
-
bool (*
PyArray_EquivTypes_)(PyObject*, PyObject*)
-
int (*
PyArray_GetArrayParamsFromObject_)(PyObject*, PyObject*, char, PyObject**, int*, Py_ssize_t*, PyObject**, PyObject*)
-
PyObject *(*
PyArray_Squeeze_)(PyObject*)
-
int (*
PyArray_SetBaseObject_)(PyObject*, PyObject*)
-
PyObject *(*
PyArray_Resize_)(PyObject*, PyArray_Dims*, int, int)
Private Types
-
enum
functions Values:
-
enumerator
API_PyArray_GetNDArrayCFeatureVersion
-
enumerator
API_PyArray_Type
-
enumerator
API_PyArrayDescr_Type
-
enumerator
API_PyVoidArrType_Type
-
enumerator
API_PyArray_DescrFromType
-
enumerator
API_PyArray_DescrFromScalar
-
enumerator
API_PyArray_FromAny
-
enumerator
API_PyArray_Resize
-
enumerator
API_PyArray_CopyInto
-
enumerator
API_PyArray_NewCopy
-
enumerator
API_PyArray_NewFromDescr
-
enumerator
API_PyArray_DescrNewFromType
-
enumerator
API_PyArray_DescrConverter
-
enumerator
API_PyArray_EquivTypes
-
enumerator
API_PyArray_GetArrayParamsFromObject
-
enumerator
API_PyArray_Squeeze
-
enumerator
API_PyArray_SetBaseObject
-
enumerator
API_PyArray_GetNDArrayCFeatureVersion
-
enumerator
API_PyArray_Type
-
enumerator
API_PyArrayDescr_Type
-
enumerator
API_PyVoidArrType_Type
-
enumerator
API_PyArray_DescrFromType
-
enumerator
API_PyArray_DescrFromScalar
-
enumerator
API_PyArray_FromAny
-
enumerator
API_PyArray_Resize
-
enumerator
API_PyArray_CopyInto
-
enumerator
API_PyArray_NewCopy
-
enumerator
API_PyArray_NewFromDescr
-
enumerator
API_PyArray_DescrNewFromType
-
enumerator
API_PyArray_DescrConverter
-
enumerator
API_PyArray_EquivTypes
-
enumerator
API_PyArray_GetArrayParamsFromObject
-
enumerator
API_PyArray_Squeeze
-
enumerator
API_PyArray_SetBaseObject
-
enumerator
-
enum
functions Values:
-
enumerator
API_PyArray_GetNDArrayCFeatureVersion
-
enumerator
API_PyArray_Type
-
enumerator
API_PyArrayDescr_Type
-
enumerator
API_PyVoidArrType_Type
-
enumerator
API_PyArray_DescrFromType
-
enumerator
API_PyArray_DescrFromScalar
-
enumerator
API_PyArray_FromAny
-
enumerator
API_PyArray_Resize
-
enumerator
API_PyArray_CopyInto
-
enumerator
API_PyArray_NewCopy
-
enumerator
API_PyArray_NewFromDescr
-
enumerator
API_PyArray_DescrNewFromType
-
enumerator
API_PyArray_DescrConverter
-
enumerator
API_PyArray_EquivTypes
-
enumerator
API_PyArray_GetArrayParamsFromObject
-
enumerator
API_PyArray_Squeeze
-
enumerator
API_PyArray_SetBaseObject
-
enumerator
API_PyArray_GetNDArrayCFeatureVersion
-
enumerator
API_PyArray_Type
-
enumerator
API_PyArrayDescr_Type
-
enumerator
API_PyVoidArrType_Type
-
enumerator
API_PyArray_DescrFromType
-
enumerator
API_PyArray_DescrFromScalar
-
enumerator
API_PyArray_FromAny
-
enumerator
API_PyArray_Resize
-
enumerator
API_PyArray_CopyInto
-
enumerator
API_PyArray_NewCopy
-
enumerator
API_PyArray_NewFromDescr
-
enumerator
API_PyArray_DescrNewFromType
-
enumerator
API_PyArray_DescrConverter
-
enumerator
API_PyArray_EquivTypes
-
enumerator
API_PyArray_GetArrayParamsFromObject
-
enumerator
API_PyArray_Squeeze
-
enumerator
API_PyArray_SetBaseObject
-
enumerator
-
enum
-
template<typename
T, typenameSFINAE>
structnpy_format_descriptor - #include <numpy.h>
Public Static Functions
-
static inline pybind11::dtype
dtype()
-
static inline std::string
format()
-
static inline void
register_dtype(any_container<field_descriptor> fields)
-
static inline pybind11::dtype
dtype()
-
static inline std::string
format()
-
static inline void
register_dtype(any_container<field_descriptor> fields)
Public Static Attributes
-
static constexpr auto
name= make_caster<T>::name
Private Static Functions
-
static inline PyObject *
dtype_ptr()
-
static inline bool
direct_converter(PyObject *obj, void *&value)
-
static inline PyObject *
dtype_ptr()
-
static inline bool
direct_converter(PyObject *obj, void *&value)
-
static inline pybind11::dtype
-
template<size_t
N>
structnpy_format_descriptor<char[N]> - #include <numpy.h>
-
template<typename
T>
structnpy_format_descriptor<T, enable_if_t<array_info<T>::is_array>> - #include <numpy.h>
Public Static Functions
-
static inline pybind11::dtype
dtype()
-
static inline pybind11::dtype
dtype()
Public Static Attributes
-
static constexpr auto
name= _("(") + array_info<T>::extents + _(")") + base_descr::name
Private Types
-
using
base_descr= npy_format_descriptor<typename array_info<T>::type>
-
using
base_descr= npy_format_descriptor<typename array_info<T>::type>
-
static inline pybind11::dtype
-
template<typename
T>
structnpy_format_descriptor<T, enable_if_t<satisfies_any_of<T, std::is_arithmetic, is_complex>::value>> : public npy_format_descriptor_name<T>, public npy_format_descriptor_name<T> - #include <numpy.h>
Public Static Functions
-
static inline pybind11::dtype
dtype()
-
static inline pybind11::dtype
dtype()
Private Static Attributes
-
static constexpr const int
values[15] = {npy_api::NPY_BOOL_, npy_api::NPY_BYTE_, npy_api::NPY_UBYTE_, npy_api::NPY_INT16_, npy_api::NPY_UINT16_, npy_api::NPY_INT32_, npy_api::NPY_UINT32_, npy_api::NPY_INT64_, npy_api::NPY_UINT64_, npy_api::NPY_FLOAT_, npy_api::NPY_DOUBLE_, npy_api::NPY_LONGDOUBLE_, npy_api::NPY_CFLOAT_, npy_api::NPY_CDOUBLE_, npy_api::NPY_CLONGDOUBLE_}
-
static inline pybind11::dtype
-
template<typename
T>
structnpy_format_descriptor<T, enable_if_t<std::is_enum<T>::value>> - #include <numpy.h>
Public Static Functions
-
static inline pybind11::dtype
dtype()
-
static inline pybind11::dtype
dtype()
Public Static Attributes
-
static constexpr auto
name= base_descr::name
-
static inline pybind11::dtype
-
template<typename
T, typename = void>
structnpy_format_descriptor_name - #include <numpy.h>
-
template<typename
T>
structnpy_format_descriptor_name<T, enable_if_t<is_complex<T>::value>> - #include <numpy.h>
-
template<typename
T>
structnpy_format_descriptor_name<T, enable_if_t<std::is_floating_point<T>::value>> - #include <numpy.h>
-
template<typename
T>
structnpy_format_descriptor_name<T, enable_if_t<std::is_integral<T>::value>> - #include <numpy.h>
-
struct
numpy_internals - #include <numpy.h>
Public Functions
-
inline numpy_type_info *
get_type_info(const std::type_info &tinfo, bool throw_if_missing = true)
-
template<typename
T>
inline numpy_type_info *get_type_info(bool throw_if_missing = true)
-
inline numpy_type_info *
get_type_info(const std::type_info &tinfo, bool throw_if_missing = true)
-
template<typename
T>
inline numpy_type_info *get_type_info(bool throw_if_missing = true)
Public Members
-
std::unordered_map<std::type_index, numpy_type_info>
registered_dtypes
-
inline numpy_type_info *
-
struct
numpy_type_info - #include <numpy.h>
Public Members
-
PyObject *
dtype_ptr
-
std::string
format_str
-
PyObject *
-
struct
obj_attr - #include <pytypes.h>
-
class
object: public handle, public handle - #include <pytypes.h>
Holds a reference to a Python object (with reference counting)
Like
handle, theobjectclass is a thin wrapper around an arbitrary Python object (i.e. aPyObject *in Python’s C API). In contrast tohandle, it optionally increases the object’s reference count upon construction, and it always* decreases the reference count when theobjectinstance goes out of scope and is destructed. When usingobjectinstances consistently, it is much easier to get reference counting right at the first attempt.Subclassed by bool_, bool_, buffer, buffer, bytes, bytes, capsule, capsule, dict, dict, dtype, dtype, exception< type >, exception< type >, float_, float_, function, function, generic_type, generic_type, int_, int_, iterable, iterable, iterator, iterator, list, list, memoryview, memoryview, module, module, none, none, sequence, sequence, set, set, slice, slice, staticmethod, staticmethod, str, str, tuple, tuple, weakref, weakref
Public Functions
-
object() = default
-
PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h
-
inline
object(const object &o) Copy constructor; always increases the reference count.
-
inline
object(object &&other) noexcept Move constructor; steals the object from
otherand preserves its reference count.
-
inline
~object() Destructor; automatically calls
handle::dec_ref()
-
inline handle
release() Resets the internal pointer to
nullptrwithout without decreasing the object’s reference count.The function returns a raw handle to the original Python object.
-
template<typename
T>
Tcast() const &
-
template<typename
T>
Tcast() &&
-
inline
object(handle h, borrowed_t)
-
object() = default
-
PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h
-
inline
object(const object &o) Copy constructor; always increases the reference count.
-
inline
object(object &&other) noexcept Move constructor; steals the object from
otherand preserves its reference count.
-
inline
~object() Destructor; automatically calls
handle::dec_ref()
-
inline handle
release() Resets the internal pointer to
nullptrwithout without decreasing the object’s reference count.The function returns a raw handle to the original Python object.
-
template<typename
T>
Tcast() const &
-
template<typename
T>
Tcast() &&
-
inline
object(handle h, borrowed_t)
-
template<typename
T>
Tcast() const &
-
template<typename
T>
Tcast() &&
-
template<>
inline voidcast() const &
-
template<>
inline voidcast() &&
-
template<typename
T>
Tcast() const &
-
template<typename
T>
Tcast() &&
-
template<>
inline voidcast() const &
-
template<>
inline voidcast() &&
Public Members
-
bool
is_borrowed
Friends
-
template<typename T> friend friend T reinterpret_borrow (handle) Declare that a
handleorPyObject *is a certain type and borrow the reference.The target type
Tmust beobjector one of its derived classes. The function doesn’t do any conversions or checks. It’s up to the user to make sure that the target type is correct... code-block:: cpp
or py::tuple t = reinterpret_borrow<py::tuple>(p); // <PyObject *p = PyList_GetItem(obj, index); py::object o = reinterpret_borrow<py::object>(p);
pmust be already be atuple
-
template<typename T> friend friend T reinterpret_steal (handle) Like
reinterpret_borrow, but steals the reference... code-block:: cpp
PyObject *p = PyObject_Str(obj); py::str s = reinterpret_steal<py::str>(p); // <
pmust be already be astr
-
template<typename T> friend friend T reinterpret_borrow (handle) Declare that a
handleorPyObject *is a certain type and borrow the reference.The target type
Tmust beobjector one of its derived classes. The function doesn’t do any conversions or checks. It’s up to the user to make sure that the target type is correct... code-block:: cpp
or py::tuple t = reinterpret_borrow<py::tuple>(p); // <PyObject *p = PyList_GetItem(obj, index); py::object o = reinterpret_borrow<py::object>(p);
pmust be already be atuple
-
template<typename T> friend friend T reinterpret_steal (handle) Like
reinterpret_borrow, but steals the reference... code-block:: cpp
PyObject *p = PyObject_Str(obj); py::str s = reinterpret_steal<py::str>(p); // <
pmust be already be astr
-
-
template<typename
Derived>
classobject_api: public pyobject_tag, public pyobject_tag - #include <pytypes.h>
A mixin class which adds common functions to
handle,objectand various accessors.The only requirement for
Derivedis to implementPyObject *Derived::ptr() const.Public Functions
-
iterator
begin() const Return an iterator equivalent to calling
iter()in Python.The object must be a collection which supports the iteration protocol.
-
iterator
end() const Return a sentinel which ends iteration.
-
item_accessor
operator[](handle key) const Return an internal functor to invoke the object’s sequence protocol.
Casting the returned
detail::item_accessorinstance to ahandleorobjectsubclass causes a corresponding call to__getitem__. Assigning ahandleorobjectsubclass causes a call to__setitem__.
-
item_accessor
operator[](const char *key) const See above (the only difference is that they key is provided as a string literal)
-
obj_attr_accessor
attr(handle key) const Return an internal functor to access the object’s attributes.
Casting the returned
detail::obj_attr_accessorinstance to ahandleorobjectsubclass causes a corresponding call togetattr. Assigning ahandleorobjectsubclass causes a call tosetattr.
-
str_attr_accessor
attr(const char *key) const See above (the only difference is that they key is provided as a string literal)
-
args_proxy
operator*() const Matches * unpacking in Python, e.g.
to unpack arguments out of a
tupleorlistfor a function call. Applying another * to the result yields unpacking, e.g. to unpack a dict as function keyword arguments. See :ref:calling_python_functions.
-
template<typename
T>
boolcontains(T &&item) const Check if the given item is contained within this object, i.e.
item in obj.
-
template<return_value_policy
policy= return_value_policy::automatic_reference, typename ...Args>
objectoperator()(Args&&... args) const Assuming the Python object is a function or implements the
__call__protocol,operator()invokes the underlying function, passing an arbitrary set of parameters.The result is returned as a
objectand may need to be converted back into a Python object usinghandle::cast().When some of the arguments cannot be converted to Python objects, the function will throw a
cast_errorexception. When the Python function call fails, aerror_already_setexception is thrown.
-
template<return_value_policy policy = return_value_policy::automatic_reference, typename... Args> PYBIND11_DEPRECATED ("call(...) was deprecated in favor of operator()(...)") object call(Args &&... args) const
-
inline bool
is(object_api const &other) const Equivalent to
obj is otherin Python.
-
inline bool
is_none() const Equivalent to
obj is Nonein Python.
-
inline bool
equal(object_api const &other) const Equivalent to obj == other in Python.
-
inline bool
not_equal(object_api const &other) const
-
inline bool
operator<(object_api const &other) const
-
inline bool
operator<=(object_api const &other) const
-
inline bool
operator>(object_api const &other) const
-
inline bool
operator>=(object_api const &other) const
-
object
operator-() const
-
object
operator~() const
-
object
operator+(object_api const &other) const
-
object
operator+=(object_api const &other) const
-
object
operator-(object_api const &other) const
-
object
operator-=(object_api const &other) const
-
object
operator*(object_api const &other) const
-
object
operator*=(object_api const &other) const
-
object
operator/(object_api const &other) const
-
object
operator/=(object_api const &other) const
-
object
operator|(object_api const &other) const
-
object
operator|=(object_api const &other) const
-
object
operator&(object_api const &other) const
-
object
operator&=(object_api const &other) const
-
object
operator^(object_api const &other) const
-
object
operator^=(object_api const &other) const
-
object
operator<<(object_api const &other) const
-
object
operator<<=(object_api const &other) const
-
object
operator>>(object_api const &other) const
-
object
operator>>=(object_api const &other) const
-
pybind11::str
str() const
-
str_attr_accessor
doc() const Get or set the object’s docstring, i.e.
obj.__doc__.
-
inline int
ref_count() const Return the object’s current reference count.
-
handle
get_type() const Return a handle to the Python type object underlying the instance.
-
iterator
begin() const Return an iterator equivalent to calling
iter()in Python.The object must be a collection which supports the iteration protocol.
-
iterator
end() const Return a sentinel which ends iteration.
-
item_accessor
operator[](handle key) const Return an internal functor to invoke the object’s sequence protocol.
Casting the returned
detail::item_accessorinstance to ahandleorobjectsubclass causes a corresponding call to__getitem__. Assigning ahandleorobjectsubclass causes a call to__setitem__.
-
item_accessor
operator[](const char *key) const See above (the only difference is that they key is provided as a string literal)
-
obj_attr_accessor
attr(handle key) const Return an internal functor to access the object’s attributes.
Casting the returned
detail::obj_attr_accessorinstance to ahandleorobjectsubclass causes a corresponding call togetattr. Assigning ahandleorobjectsubclass causes a call tosetattr.
-
str_attr_accessor
attr(const char *key) const See above (the only difference is that they key is provided as a string literal)
-
args_proxy
operator*() const Matches * unpacking in Python, e.g.
to unpack arguments out of a
tupleorlistfor a function call. Applying another * to the result yields unpacking, e.g. to unpack a dict as function keyword arguments. See :ref:calling_python_functions.
-
template<typename
T>
boolcontains(T &&item) const Check if the given item is contained within this object, i.e.
item in obj.
-
template<return_value_policy
policy= return_value_policy::automatic_reference, typename ...Args>
objectoperator()(Args&&... args) const Assuming the Python object is a function or implements the
__call__protocol,operator()invokes the underlying function, passing an arbitrary set of parameters.The result is returned as a
objectand may need to be converted back into a Python object usinghandle::cast().When some of the arguments cannot be converted to Python objects, the function will throw a
cast_errorexception. When the Python function call fails, aerror_already_setexception is thrown.
-
template<return_value_policy policy = return_value_policy::automatic_reference, typename... Args> PYBIND11_DEPRECATED ("call(...) was deprecated in favor of operator()(...)") object call(Args &&... args) const
-
inline bool
is(object_api const &other) const Equivalent to
obj is otherin Python.
-
inline bool
is_none() const Equivalent to
obj is Nonein Python.
-
inline bool
equal(object_api const &other) const Equivalent to obj == other in Python.
-
inline bool
not_equal(object_api const &other) const
-
inline bool
operator<(object_api const &other) const
-
inline bool
operator<=(object_api const &other) const
-
inline bool
operator>(object_api const &other) const
-
inline bool
operator>=(object_api const &other) const
-
object
operator-() const
-
object
operator~() const
-
object
operator+(object_api const &other) const
-
object
operator+=(object_api const &other) const
-
object
operator-(object_api const &other) const
-
object
operator-=(object_api const &other) const
-
object
operator*(object_api const &other) const
-
object
operator*=(object_api const &other) const
-
object
operator/(object_api const &other) const
-
object
operator/=(object_api const &other) const
-
object
operator|(object_api const &other) const
-
object
operator|=(object_api const &other) const
-
object
operator&(object_api const &other) const
-
object
operator&=(object_api const &other) const
-
object
operator^(object_api const &other) const
-
object
operator^=(object_api const &other) const
-
object
operator<<(object_api const &other) const
-
object
operator<<=(object_api const &other) const
-
object
operator>>(object_api const &other) const
-
object
operator>>=(object_api const &other) const
-
pybind11::str
str() const
-
str_attr_accessor
doc() const Get or set the object’s docstring, i.e.
obj.__doc__.
-
inline int
ref_count() const Return the object’s current reference count.
-
handle
get_type() const Return a handle to the Python type object underlying the instance.
Private Functions
-
inline const Derived &
derived() const
-
bool
rich_compare(object_api const &other, int value) const
-
inline const Derived &
derived() const
-
bool
rich_compare(object_api const &other, int value) const
-
iterator
-
class
OnTheFlyPrimeTable: public PrimeTable - #include <prime_tables.h>
Public Functions
-
inline virtual bool
IsPrime(int n) const override
-
inline virtual int
GetNextPrime(int p) const override
-
inline virtual bool
-
template<op_id
id, op_typeot, typenameL, typenameR>
structop_ - #include <attr.h>
Operator implementation generator.
Public Functions
-
template<typename
Class, typename ...Extra>
inline voidexecute(Class &cl, const Extra&... extra) const
-
template<typename
Class, typename ...Extra>
inline voidexecute_cast(Class &cl, const Extra&... extra) const
-
template<typename
-
template<op_id, op_type, typename
B, typenameL, typenameR>
structop_impl - #include <operators.h>
base template of operator implementations
-
template<typename
T>
structoptional_caster - #include <stl.h>
Public Types
-
using
value_conv= make_caster<typename T::value_type>
-
using
value_conv= make_caster<typename T::value_type>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (T, _("Optional[")+value_conv::name+_("]"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (T, _("Optional[")+value_conv::name+_("]"))
Public Static Functions
-
template<typename
T_>
static inline handlecast(T_ &&src, return_value_policy policy, handle parent)
-
template<typename
T_>
static inline handlecast(T_ &&src, return_value_policy policy, handle parent)
-
using
-
class
options - #include <options.h>
Public Functions
-
inline
options()
-
options(const options&) = delete
-
inline
~options()
-
inline options &
disable_user_defined_docstrings() &
-
inline options &
enable_user_defined_docstrings() &
-
inline options &
disable_function_signatures() &
-
inline options &
enable_function_signatures() &
-
void *
operator new(size_t) = delete
-
inline
options()
-
options(const options&) = delete
-
inline
~options()
-
inline options &
disable_user_defined_docstrings() &
-
inline options &
enable_user_defined_docstrings() &
-
inline options &
disable_function_signatures() &
-
inline options &
enable_function_signatures() &
-
void *
operator new(size_t) = delete
Public Static Functions
-
static inline bool
show_user_defined_docstrings()
-
static inline bool
show_function_signatures()
-
static inline bool
show_user_defined_docstrings()
-
static inline bool
show_function_signatures()
Private Members
-
state
previous_state
-
inline
-
class
OstreamRedirect - #include <iostream.h>
Public Functions
-
inline
OstreamRedirect(bool do_stdout = true, bool do_stderr = true)
-
inline void
enter()
-
inline void
exit()
-
inline
OstreamRedirect(bool do_stdout = true, bool do_stderr = true)
-
inline void
enter()
-
inline void
exit()
Private Members
-
bool
do_stdout_
-
bool
do_stderr_
-
std::unique_ptr<scoped_ostream_redirect>
redirect_stdout
-
std::unique_ptr<scoped_estream_redirect>
redirect_stderr
-
inline
-
template<typename ...
Args>
structoverload_cast - #include <common.h>
-
template<typename ...
Args>
structoverload_cast_impl - #include <common.h>
Public Functions
-
inline constexpr
overload_cast_impl()
-
template<typename
Return>
inline constexpr autooperator()(Return (*pf)(Args...)) const noexcept -> decltype(pf)
-
template<typename
Return, typenameClass>
inline constexpr autooperator()(Return (Class::* pmf)(Args...), std::false_type = {}, ) const noexcept -> decltype(pmf)
-
template<typename
Return, typenameClass>
inline constexpr autooperator()(Return (Class::* pmf)(Args...) const, std::true_type, ) const noexcept -> decltype(pmf)
-
inline constexpr
overload_cast_impl()
-
template<typename
Return>
inline constexpr autooperator()(Return (*pf)(Args...)) const noexcept -> decltype(pf)
-
inline constexpr
-
struct
overload_hash - #include <internals.h>
-
struct
overload_unused - #include <cast.h>
-
template<size_t
N, typenameT, typename ...Ts>
structpack_element - #include <common.h>
Return the Nth element from the parameter pack.
Public Types
-
using
type= typename pack_element<N - 1, Ts...>::type
-
using
type= typename pack_element<N - 1, Ts...>::type
-
using
-
class
ParameterizedDeathTest: public testing::TestWithParam<int>
-
class
ParameterizedDerivedTest: public NonParameterizedBaseTest, public testing::WithParamInterface<int> Protected Functions
-
inline
ParameterizedDerivedTest()
Protected Attributes
-
int
count_
Protected Static Attributes
-
static int
global_count_= 0
-
inline
-
class
ParamTest: public testing::TestWithParam<int>, public testing::TestWithParam<std::string>
-
class
ParentClass Subclassed by ChildClassWithoutStreamOperator, ChildClassWithStreamOperator
-
class
testing::ParseFlagsTest: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
-
class
foo::PathLike -
Friends
-
inline friend friend ::std::ostream & operator<< (::std::ostream &os, const PathLike &)
-
-
template<typename
Get, typenameSet, typename = function_signature_t<Get>, typename = function_signature_t<Set>>
structpickle_factory - #include <init.h>
Implementation for py::pickle(GetState, SetState)
-
template<typename
Get, typenameSet, typenameRetState, typenameSelf, typenameNewInstance, typenameArgState>
structpickle_factory<Get, Set, RetState(Self), NewInstance(ArgState)> - #include <init.h>
Public Functions
-
class
package_template::PID - #include <pid.hpp>
Simple 1D pid controller.
Public Functions
-
PID() Construct a default PID object using the DefaultConfiguration.
-
PID(const Gains_configuration &configuration) Construct a new PID object using a user provided configuration.
- Parameters
configuration –
-
~PID()
-
double
compute(const double position, const double velocity, const double position_target, const double delta_time) compute the force related to the pid controller.
Warning
this function is not stateless, as it performs integration. Call reset_pid() to reset the integral part.
- Parameters
position – current position
velocity – current velocity
position_target – target position
delta_time – time passed since last measurement. Used for integral computation
- Returns
computed force
-
void
reset_integral() reset integral part of the PID
Private Members
-
const Gains_configuration *
configuration_
-
bool
private_configuration_
-
double
integral_
-
-
struct
PointerPrintable
-
template<typename
itype, typenameSFINAE= void>
structpolymorphic_type_hook - #include <cast.h>
-
template<typename
itype>
structpolymorphic_type_hook<itype, detail::enable_if_t<std::is_polymorphic<itype>::value>> - #include <cast.h>
-
template<typename
Impl>
classtesting::PolymorphicAction - #include <gmock-actions.h>
Public Functions
-
inline explicit
PolymorphicAction(const Impl &impl)
-
template<typename
F>
inlineoperator Action<F>() const
-
inline explicit
PolymorphicAction(const Impl &impl)
-
template<typename
F>
inlineoperator Action<F>() const
Private Members
-
Impl
impl_
-
inline explicit
-
class
PreCalculatedPrimeTable: public PrimeTable - #include <prime_tables.h>
Public Functions
-
inline explicit
PreCalculatedPrimeTable(int max)
-
inline
~PreCalculatedPrimeTable() override
-
inline virtual bool
IsPrime(int n) const override
-
inline virtual int
GetNextPrime(int p) const override
Private Functions
-
inline void
CalculatePrimesUpTo(int max)
-
void
operator=(const PreCalculatedPrimeTable &rhs)
Private Members
-
const int
is_prime_size_
-
bool *const
is_prime_
-
inline explicit
-
struct
PredFormatFunctor1
-
struct
PredFormatFunctor2
-
struct
PredFormatFunctor3
-
struct
PredFormatFunctor4
-
struct
PredFormatFunctor5
-
struct
PredFunctor1 Public Functions
-
template<typename
T1>
inline booloperator()(const T1 &v1)
-
template<typename
-
struct
PredFunctor2
-
struct
PredFunctor3
-
struct
PredFunctor4
-
struct
PredFunctor5
-
class
Predicate1Test: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Attributes
-
static bool
expected_to_finish_
-
static bool
finished_
-
static int
n1_
-
inline virtual void
-
class
Predicate2Test: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Attributes
-
static bool
expected_to_finish_
-
static bool
finished_
-
static int
n1_
-
static int
n2_
-
inline virtual void
-
class
Predicate3Test: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Attributes
-
static bool
expected_to_finish_
-
static bool
finished_
-
static int
n1_
-
static int
n2_
-
static int
n3_
-
inline virtual void
-
class
Predicate4Test: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Attributes
-
static bool
expected_to_finish_
-
static bool
finished_
-
static int
n1_
-
static int
n2_
-
static int
n3_
-
static int
n4_
-
inline virtual void
-
class
Predicate5Test: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Protected Static Attributes
-
static bool
expected_to_finish_
-
static bool
finished_
-
static int
n1_
-
static int
n2_
-
static int
n3_
-
static int
n4_
-
static int
n5_
-
inline virtual void
-
class
testing::internal::PrettyUnitTestResultPrinter: public testing::TestEventListener Public Functions
-
inline
PrettyUnitTestResultPrinter()
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
virtual void
OnTestIterationStart(const UnitTest &unit_test, int iteration) override
-
virtual void
OnEnvironmentsSetUpStart(const UnitTest &unit_test) override
-
inline virtual void
OnEnvironmentsSetUpEnd(const UnitTest&) override
-
virtual void
OnTestCaseStart(const TestCase &test_case) override
-
virtual void
OnTestStart(const TestInfo &test_info) override
-
virtual void
OnTestPartResult(const TestPartResult &result) override
-
virtual void
OnTestEnd(const TestInfo &test_info) override
-
virtual void
OnTestCaseEnd(const TestCase &test_case) override
-
virtual void
OnEnvironmentsTearDownStart(const UnitTest &unit_test) override
-
inline virtual void
OnEnvironmentsTearDownEnd(const UnitTest&) override
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
Public Static Functions
-
static inline void
PrintTestName(const char *test_suite, const char *test)
-
inline
-
class
PrimeTable - #include <prime_tables.h>
Subclassed by OnTheFlyPrimeTable, PreCalculatedPrimeTable
Public Functions
-
inline virtual
~PrimeTable()
-
virtual bool
IsPrime(int n) const = 0
-
virtual int
GetNextPrime(int p) const = 0
-
inline virtual
-
struct
foo::PrintableViaPrintTo Public Functions
-
inline
PrintableViaPrintTo()
Public Members
-
int
value
-
inline
-
template<typename
T>
classfoo::PrintableViaPrintToTemplate Public Functions
-
inline explicit
PrintableViaPrintToTemplate(const T &a_value)
-
inline const T &
value() const
Private Members
-
T
value_
-
inline explicit
-
struct
private_ctor
-
struct
private_ctr_tag
-
class
PrivateCode - #include <production.h>
Public Functions
-
FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers)
-
FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers)
-
PrivateCode()
-
inline int
x() const
Private Functions
-
inline void
set_x(int an_x)
Private Members
-
int
x_
-
-
template<typename
T, typenameSFINAE= void>
structprocess_attribute - #include <attr.h>
Partial template specializations to process custom attributes provided to cpp_function_ and class_.
These are either used to initialize the respective fields in the type_record and function_record data structures or executed at runtime to deal with custom call policies (e.g. keep_alive).
-
template<>
structprocess_attribute<arg> : public process_attribute_default<arg>, public process_attribute_default<arg> - #include <attr.h>
Process a keyword argument attribute (without a default value)
Public Static Functions
-
static inline void
init(const arg &a, function_record *r)
-
static inline void
init(const arg &a, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<arg_v> : public process_attribute_default<arg_v>, public process_attribute_default<arg_v> - #include <attr.h>
Process a keyword argument attribute (with a default value)
Public Static Functions
-
static inline void
init(const arg_v &a, function_record *r)
-
static inline void
init(const arg_v &a, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<arithmetic> : public process_attribute_default<arithmetic>, public process_attribute_default<arithmetic> - #include <attr.h>
Process an ‘arithmetic’ attribute for enums (does nothing here)
-
template<typename
T>
structprocess_attribute<base<T>> : public process_attribute_default<base<T>>, public process_attribute_default<base<T>> - #include <attr.h>
Process a parent class attribute (deprecated, does not support multiple inheritance)
Public Static Functions
-
static inline void
init(const base<T>&, type_record *r)
-
static inline void
init(const base<T>&, type_record *r)
-
static inline void
-
template<>
structprocess_attribute<buffer_protocol> : public process_attribute_default<buffer_protocol>, public process_attribute_default<buffer_protocol> - #include <attr.h>
Public Static Functions
-
static inline void
init(const buffer_protocol&, type_record *r)
-
static inline void
init(const buffer_protocol&, type_record *r)
-
static inline void
-
template<typename ...
Ts>
structprocess_attribute<call_guard<Ts...>> : public process_attribute_default<call_guard<Ts...>>, public process_attribute_default<call_guard<Ts...>> - #include <attr.h>
-
template<>
structprocess_attribute<char*> : public process_attribute<const char*>, public process_attribute<const char*> - #include <attr.h>
-
template<>
structprocess_attribute<const char*> - #include <attr.h>
Process an attribute specifying the function’s docstring (provided as a C-style string)
Public Static Functions
-
static inline void
init(const char *d, function_record *r)
-
static inline void
init(const char *d, type_record *r)
-
static inline void
init(const char *d, function_record *r)
-
static inline void
init(const char *d, type_record *r)
-
static inline void
-
template<>
structprocess_attribute<doc> : public process_attribute_default<doc>, public process_attribute_default<doc> - #include <attr.h>
Process an attribute specifying the function’s docstring.
Public Static Functions
-
static inline void
init(const doc &n, function_record *r)
-
static inline void
init(const doc &n, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<dynamic_attr> : public process_attribute_default<dynamic_attr>, public process_attribute_default<dynamic_attr> - #include <attr.h>
Public Static Functions
-
static inline void
init(const dynamic_attr&, type_record *r)
-
static inline void
init(const dynamic_attr&, type_record *r)
-
static inline void
-
template<>
structprocess_attribute<is_method> : public process_attribute_default<is_method>, public process_attribute_default<is_method> - #include <attr.h>
Process an attribute which indicates that this function is a method.
Public Static Functions
-
static inline void
init(const is_method &s, function_record *r)
-
static inline void
init(const is_method &s, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<is_new_style_constructor> : public process_attribute_default<is_new_style_constructor>, public process_attribute_default<is_new_style_constructor> - #include <attr.h>
Public Static Functions
-
static inline void
init(const is_new_style_constructor&, function_record *r)
-
static inline void
init(const is_new_style_constructor&, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<is_operator> : public process_attribute_default<is_operator>, public process_attribute_default<is_operator> - #include <attr.h>
Process an attribute which indicates that this function is an operator.
Public Static Functions
-
static inline void
init(const is_operator&, function_record *r)
-
static inline void
init(const is_operator&, function_record *r)
-
static inline void
-
template<size_t
Nurse, size_tPatient>
structprocess_attribute<keep_alive<Nurse, Patient>> : public process_attribute_default<keep_alive<Nurse, Patient>>, public process_attribute_default<keep_alive<Nurse, Patient>> - #include <attr.h>
Process a keep_alive call policy invokes keep_alive_impl during the pre-call handler if both Nurse, Patient != 0 and use the post-call handler otherwise.
Public Static Functions
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N != 0 && P != 0, int> = 0>
static inline voidprecall(function_call &call)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N != 0 && P != 0, int> = 0>
static inline voidpostcall(function_call&, handle)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N == 0 || P == 0, int> = 0>
static inline voidprecall(function_call&)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N == 0 || P == 0, int> = 0>
static inline voidpostcall(function_call &call, handle ret)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N != 0 && P != 0, int> = 0>
static inline voidprecall(function_call &call)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N != 0 && P != 0, int> = 0>
static inline voidpostcall(function_call&, handle)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N == 0 || P == 0, int> = 0>
static inline voidprecall(function_call&)
-
template<size_t
N= Nurse, size_tP= Patient, enable_if_t<N == 0 || P == 0, int> = 0>
static inline voidpostcall(function_call &call, handle ret)
-
template<size_t
-
template<>
structprocess_attribute<metaclass> : public process_attribute_default<metaclass>, public process_attribute_default<metaclass> - #include <attr.h>
Public Static Functions
-
static inline void
init(const metaclass &m, type_record *r)
-
static inline void
init(const metaclass &m, type_record *r)
-
static inline void
-
template<>
structprocess_attribute<module_local> : public process_attribute_default<module_local>, public process_attribute_default<module_local> - #include <attr.h>
Public Static Functions
-
static inline void
init(const module_local &l, type_record *r)
-
static inline void
init(const module_local &l, type_record *r)
-
static inline void
-
template<>
structprocess_attribute<multiple_inheritance> : public process_attribute_default<multiple_inheritance>, public process_attribute_default<multiple_inheritance> - #include <attr.h>
Process a multiple inheritance attribute.
Public Static Functions
-
static inline void
init(const multiple_inheritance&, type_record *r)
-
static inline void
init(const multiple_inheritance&, type_record *r)
-
static inline void
-
template<>
structprocess_attribute<name> : public process_attribute_default<name>, public process_attribute_default<name> - #include <attr.h>
Process an attribute specifying the function’s name.
Public Static Functions
-
static inline void
init(const name &n, function_record *r)
-
static inline void
init(const name &n, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<return_value_policy> : public process_attribute_default<return_value_policy>, public process_attribute_default<return_value_policy> - #include <attr.h>
Process an attribute indicating the function’s return value policy.
Public Static Functions
-
static inline void
init(const return_value_policy &p, function_record *r)
-
static inline void
init(const return_value_policy &p, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<scope> : public process_attribute_default<scope>, public process_attribute_default<scope> - #include <attr.h>
Process an attribute which indicates the parent scope of a method.
Public Static Functions
-
static inline void
init(const scope &s, function_record *r)
-
static inline void
init(const scope &s, function_record *r)
-
static inline void
-
template<>
structprocess_attribute<sibling> : public process_attribute_default<sibling>, public process_attribute_default<sibling> - #include <attr.h>
Process an attribute which indicates that this is an overloaded function associated with a given sibling.
Public Static Functions
-
static inline void
init(const sibling &s, function_record *r)
-
static inline void
init(const sibling &s, function_record *r)
-
static inline void
-
template<typename
T>
structprocess_attribute<T, enable_if_t<is_pyobject<T>::value>> : public process_attribute_default<handle>, public process_attribute_default<handle> - #include <attr.h>
Process a parent class attribute. Single inheritance only (class_ itself already guarantees that)
Public Static Functions
-
static inline void
init(const handle &h, type_record *r)
-
static inline void
init(const handle &h, type_record *r)
-
static inline void
-
template<typename
T>
structprocess_attribute_default - #include <attr.h>
Public Static Functions
-
static inline void
init(const T&, function_record*) Default implementation: do nothing.
-
static inline void
init(const T&, type_record*)
-
static inline void
precall(function_call&)
-
static inline void
postcall(function_call&, handle)
-
static inline void
init(const T&, function_record*) Default implementation: do nothing.
-
static inline void
init(const T&, type_record*)
-
static inline void
precall(function_call&)
-
static inline void
postcall(function_call&, handle)
-
static inline void
-
template<typename ...
Args>
structprocess_attributes - #include <attr.h>
Recursively iterate over variadic template arguments.
Public Static Functions
-
static inline void
init(const Args&... args, function_record *r)
-
static inline void
init(const Args&... args, type_record *r)
-
static inline void
precall(function_call &call)
-
static inline void
postcall(function_call &call, handle fn_ret)
-
static inline void
init(const Args&... args, function_record *r)
-
static inline void
init(const Args&... args, type_record *r)
-
static inline void
precall(function_call &call)
-
static inline void
postcall(function_call &call, handle fn_ret)
-
static inline void
-
class
PropertyOne: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline virtual void
-
class
PropertyRecordingTest: public Test Public Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
-
static inline void
-
class
PropertyTwo: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline virtual void
-
class
ProtectedFixtureMethodsTest: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
-
inline virtual void
-
struct
testing::internal::ProtobufPrinter - #include <gtest-printers.h>
Public Static Functions
Public Static Attributes
-
static const size_t
kProtobufOneLinerMaxLength= 50
-
static const size_t
-
struct
npy_api::PyArray_Dims - #include <numpy.h>
Public Members
-
Py_intptr_t *
ptr
-
int
len
-
Py_intptr_t *
-
struct
PyArray_Proxy - #include <numpy.h>
-
struct
PyArrayDescr_Proxy - #include <numpy.h>
Public Members
-
PyObject_HEAD PyObject * typeobj
-
char
kind
-
char
type
-
char
byteorder
-
char
flags
-
int
type_num
-
int
elsize
-
int
alignment
-
char *
subarray
-
PyObject *
fields
-
PyObject *
names
-
-
template<typename
type>
structpyobject_caster - #include <cast.h>
Public Functions
-
template<typename
T= type, enable_if_t<std::is_same<T, handle>::value, int> = 0>
inline boolload(handle src, bool)
-
template<typename
T= type, enable_if_t<std::is_base_of<object, T>::value, int> = 0>
inline boolload(handle src, bool)
-
PYBIND11_TYPE_CASTER(type, handle_type_name<type>::name)
-
template<typename
T= type, enable_if_t<std::is_same<T, handle>::value, int> = 0>
inline boolload(handle src, bool)
-
template<typename
T= type, enable_if_t<std::is_base_of<object, T>::value, int> = 0>
inline boolload(handle src, bool)
-
PYBIND11_TYPE_CASTER(type, handle_type_name<type>::name)
Public Static Functions
-
static inline handle
cast(const handle &src, return_value_policy, handle)
-
static inline handle
cast(const handle &src, return_value_policy, handle)
-
template<typename
-
template<typename
T, intExtraFlags>
structpyobject_caster<array_t<T, ExtraFlags>> - #include <numpy.h>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER(type, handle_type_name<type>::name)
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER(type, handle_type_name<type>::name)
Public Static Functions
-
static inline handle
cast(const handle &src, return_value_policy, handle)
-
static inline handle
cast(const handle &src, return_value_policy, handle)
-
inline bool
-
class
pyobject_tag - #include <pytypes.h>
Tag and check to identify a class which implements the Python object API.
Subclassed by object_api< Derived >, object_api< Derived >, object_api< accessor< Policy > >, object_api< accessor< Policy > >
-
class
pythonbuf: public streambuf, public streambuf - #include <iostream.h>
Public Functions
-
pythonbuf(pythonbuf&&) = default
-
inline
~pythonbuf() Sync before destroy.
-
pythonbuf(pythonbuf&&) = default
-
inline
~pythonbuf() Sync before destroy.
Private Types
-
using
traits_type= std::streambuf::traits_type
-
using
traits_type= std::streambuf::traits_type
Private Functions
-
inline int
overflow(int c)
-
inline int
sync()
-
inline int
overflow(int c)
-
inline int
sync()
-
-
struct
PyVoidScalarObject_Proxy - #include <numpy.h>
-
template<typename
E>
classQueue - #include <sample3-inl.h>
-
template<typename
E>
classQueueNode - #include <sample3-inl.h>
Public Functions
-
inline const E &
element() const
-
inline QueueNode *
next()
-
inline const QueueNode *
next() const
Friends
- friend class Queue< E >
-
inline const E &
-
template<typename
T>
structremove_class - #include <common.h>
Strip the class from a method type.
-
template<typename
C, typenameR, typename ...A>
structremove_class<R (C::*)(A...) const> - #include <common.h>
-
template<typename
C, typenameR, typename ...A>
structremove_class<R (C::*)(A...)> - #include <common.h>
-
template<typename
Return, typenameSFINAE= void>
structreturn_value_policy_override - #include <cast.h>
Public Static Functions
-
static inline return_value_policy
policy(return_value_policy p)
-
static inline return_value_policy
policy(return_value_policy p)
-
static inline return_value_policy
-
template<typename
Return>
structreturn_value_policy_override<Return, detail::enable_if_t<std::is_base_of<type_caster_generic, make_caster<Return>>::value, void>> - #include <cast.h>
Public Static Functions
-
static inline return_value_policy
policy(return_value_policy p)
-
static inline return_value_policy
policy(return_value_policy p)
-
static inline return_value_policy
-
template<typename
R>
classtesting::internal::ReturnAction - #include <gmock-actions.h>
Public Functions
-
inline explicit
ReturnAction(R value)
-
template<typename
F>
inlineoperator Action<F>() const
-
inline explicit
ReturnAction(R value)
-
template<typename
F>
inlineoperator Action<F>() const
Private Members
-
const std::shared_ptr<R>
value_
-
inline explicit
-
template<typename
T, typename ...Params>
structtesting::internal::ReturnNewAction - #include <gmock-actions.h>
Public Members
-
std::tuple<Params...>
params
-
std::tuple<Params...>
-
class
testing::internal::ReturnNullAction - #include <gmock-actions.h>
Public Static Functions
-
template<typename
Result, typenameArgumentTuple>
static inline ResultPerform(const ArgumentTuple&)
-
template<typename
Result, typenameArgumentTuple>
static inline ResultPerform(const ArgumentTuple&)
-
template<typename
-
template<typename
Ptr>
structtesting::internal::ReturnPointeeAction - #include <gmock-actions.h>
Public Functions
Public Members
-
Ptr
pointer
-
Ptr
-
template<typename
T>
classtesting::internal::ReturnRefAction - #include <gmock-actions.h>
Public Functions
-
inline explicit
ReturnRefAction(T &ref)
-
template<typename
F>
inlineoperator Action<F>() const
-
inline explicit
ReturnRefAction(T &ref)
-
template<typename
F>
inlineoperator Action<F>() const
Private Members
-
T &
ref_
-
inline explicit
-
template<typename
T>
classtesting::internal::ReturnRefOfCopyAction - #include <gmock-actions.h>
Public Functions
-
inline explicit
ReturnRefOfCopyAction(const T &value)
-
template<typename
F>
inlineoperator Action<F>() const
-
inline explicit
ReturnRefOfCopyAction(const T &value)
-
template<typename
F>
inlineoperator Action<F>() const
Private Members
-
const T
value_
-
inline explicit
-
class
testing::internal::ReturnVoidAction - #include <gmock-actions.h>
Public Static Functions
-
template<typename
Result, typenameArgumentTuple>
static inline voidPerform(const ArgumentTuple&)
-
template<typename
Result, typenameArgumentTuple>
static inline voidPerform(const ArgumentTuple&)
-
template<typename
-
class
package_template::RosParameters_configuration: public package_template::Gains_configuration - #include <rosparameters_configuration.hpp>
Read gains configuration from the ros parameter server.
Public Functions
-
RosParameters_configuration() Attempt to get the gains from the parameter server (“gains_kp”,”gains_kd”,”gains_ki” parameters) If roscore is running, calls to this constructor will be blocking until all the gains are read or roscore is turned off.
If roscore is turned off before gains are read, has_error() will return true
- See
-
virtual double
get_kp() const Get the proportinal gain.
-
virtual double
get_kd() const Get the derivative gain.
-
virtual double
get_ki() const get the integral gain
-
virtual bool
has_error() const Check if there are internal errors
-
virtual std::string
get_error() const Get the error messages
Private Members
-
double
kp_ Proportinal gain.
-
double
kd_ Derivative gain.
-
double
ki_ Integral gain.
-
std::string
error_message_ Internal error message.
-
bool
error_ True is an error occured.
-
-
template<typename
T>
structsame_size - #include <numpy.h>
Public Types
-
using
as= bool_constant<sizeof(T) == sizeof(U)>
-
using
as= bool_constant<sizeof(T) == sizeof(U)>
-
using
-
template<size_t
k, typenamePtr>
structtesting::internal::SaveArgAction - #include <gmock-actions.h>
Public Functions
-
template<typename ...
Args>
inline voidoperator()(const Args&... args) const
-
template<typename ...
Args>
inline voidoperator()(const Args&... args) const
Public Members
-
Ptr
pointer
-
template<typename ...
-
template<size_t
k, typenamePtr>
structtesting::internal::SaveArgPointeeAction - #include <gmock-actions.h>
Public Functions
-
template<typename ...
Args>
inline voidoperator()(const Args&... args) const
-
template<typename ...
Args>
inline voidoperator()(const Args&... args) const
Public Members
-
Ptr
pointer
-
template<typename ...
-
struct
scope - #include <attr.h>
Annotation for parent scope.
Public Members
-
handle
value
-
handle
-
class
scoped_estream_redirect: public scoped_ostream_redirect, public scoped_ostream_redirect - #include <iostream.h>
Like
scoped_ostream_redirect, but redirects cerr by default.This class is provided primary to make
py::call_guardeasier to make... code-block:: cpp
m.def(“noisy_func”, &noisy_func, py::call_guard<scoped_ostream_redirect, scoped_estream_redirect>());
-
class
scoped_interpreter - #include <embed.h>
Scope guard version of
initialize_interpreterandfinalize_interpreter.This a move-only guard and only a single instance can exist.
.. code-block:: cpp
#include <pybind11/embed.h> int main() { py::scoped_interpreter guard{}; py::print(Hello, World!); } // <-- interpreter shutdownPublic Functions
-
inline
scoped_interpreter(bool init_signal_handlers = true)
-
scoped_interpreter(const scoped_interpreter&) = delete
-
inline
scoped_interpreter(scoped_interpreter &&other) noexcept
-
scoped_interpreter &
operator=(const scoped_interpreter&) = delete
-
scoped_interpreter &
operator=(scoped_interpreter&&) = delete
-
inline
~scoped_interpreter()
-
inline
scoped_interpreter(bool init_signal_handlers = true)
-
scoped_interpreter(const scoped_interpreter&) = delete
-
inline
scoped_interpreter(scoped_interpreter &&other) noexcept
-
scoped_interpreter &
operator=(const scoped_interpreter&) = delete
-
scoped_interpreter &
operator=(scoped_interpreter&&) = delete
-
inline
~scoped_interpreter()
Private Members
-
bool
is_valid= true
-
inline
-
class
scoped_ostream_redirect - #include <iostream.h>
This a move-only guard that redirects output.
.. code-block:: cpp
#include <pybind11/iostream.h> ... { py::scoped_ostream_redirect output; std::cout << "Hello, World!"; // Python stdout } // <-- return std::cout to normal
You can explicitly pass the c++ stream and the python object, for example to guard stderr instead.
.. code-block:: cpp
{ py::scoped_ostream_redirect output{std::cerr, py::module::import("sys").attr("stderr")}; std::cerr << "Hello, World!"; }
Subclassed by scoped_estream_redirect, scoped_estream_redirect
Public Functions
-
inline
scoped_ostream_redirect(std::ostream &costream = std::cout, object pyostream = module::import("sys").attr("stdout"))
-
inline
~scoped_ostream_redirect()
-
scoped_ostream_redirect(const scoped_ostream_redirect&) = delete
-
scoped_ostream_redirect(scoped_ostream_redirect &&other) = default
-
scoped_ostream_redirect &
operator=(const scoped_ostream_redirect&) = delete
-
scoped_ostream_redirect &
operator=(scoped_ostream_redirect&&) = delete
-
inline
scoped_ostream_redirect(std::ostream &costream = std::cout, object pyostream = module::import("sys").attr("stdout"))
-
inline
~scoped_ostream_redirect()
-
scoped_ostream_redirect(const scoped_ostream_redirect&) = delete
-
scoped_ostream_redirect(scoped_ostream_redirect &&other) = default
-
scoped_ostream_redirect &
operator=(const scoped_ostream_redirect&) = delete
-
scoped_ostream_redirect &
operator=(scoped_ostream_redirect&&) = delete
-
inline
-
class
testing::internal::ScopedPrematureExitFile Public Functions
-
inline explicit
ScopedPrematureExitFile(const char *premature_exit_filepath)
-
inline
~ScopedPrematureExitFile()
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedPrematureExitFile)
Private Members
-
const std::string
premature_exit_filepath_
-
inline explicit
-
class
testing::ScopedTrace - #include <gtest.h>
Public Functions
-
template<typename
T>
inlineScopedTrace(const char *file, int line, const T &message)
-
inline
ScopedTrace(const char *file, int line, const char *message)
-
inline
ScopedTrace(const char *file, int line, const std::string &message)
-
~ScopedTrace()
-
template<typename
T>
inlineScopedTrace(const char *file, int line, const T &message)
-
inline
ScopedTrace(const char *file, int line, const char *message)
-
inline
ScopedTrace(const char *file, int line, const std::string &message)
-
~ScopedTrace()
Private Functions
-
void
PushTrace(const char *file, int line, std::string message)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace)
-
void
PushTrace(const char *file, int line, std::string message)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(ScopedTrace)
-
template<typename
-
template<typename
ISeq, size_t, bool...>
structselect_indices_impl - #include <common.h>
Make an index sequence of the indices of true arguments.
-
template<size_t...
IPrev, size_tI, boolB, bool...Bs>
structselect_indices_impl<index_sequence<IPrev...>, I, B, Bs...> : public select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>, I + 1, Bs...>, public select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>, I + 1, Bs...> - #include <common.h>
-
struct
self_t - #include <operators.h>
-
class
SeparateInstanceTest: public testing::TestWithParam<int> Public Functions
-
inline
SeparateInstanceTest()
Public Static Functions
-
static inline void
TearDownTestSuite()
Protected Attributes
-
int
count_
Protected Static Attributes
-
static int
global_count_= 0
-
inline
-
class
sequence: public object, public object - #include <pytypes.h>
Public Functions
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::sequence_accessor
operator[](size_t index) const
-
inline detail::item_accessor
operator[](handle h) const
-
inline detail::sequence_iterator
begin() const
-
inline detail::sequence_iterator
end() const
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::sequence_accessor
operator[](size_t index) const
-
inline detail::item_accessor
operator[](handle h) const
-
inline detail::sequence_iterator
begin() const
-
inline detail::sequence_iterator
end() const
-
inline size_t
-
class
sequence_fast_readonly - #include <pytypes.h>
Lightweight iterator policy using just a simple pointer: see
PySequence_Fast_ITEMSProtected Types
-
using
iterator_category= std::random_access_iterator_tag¶
-
using
pointer= arrow_proxy<const handle>¶
-
using
iterator_category= std::random_access_iterator_tag
-
using
value_type= handle
-
using
reference= const handle
-
using
pointer= arrow_proxy<const handle>
Protected Functions
-
inline void
increment()¶
-
inline void
decrement()¶
-
inline bool
equal(const sequence_fast_readonly &b) const¶
-
inline ssize_t
distance_to(const sequence_fast_readonly &b) const¶
-
inline reference
dereference() const
-
inline void
increment()
-
inline void
decrement()
-
inline void
advance(ssize_t n)
-
inline bool
equal(const sequence_fast_readonly &b) const
-
inline ssize_t
distance_to(const sequence_fast_readonly &b) const
Private Members
-
PyObject **
ptr
-
using
-
struct
sequence_item - #include <pytypes.h>
-
class
sequence_slow_readwrite - #include <pytypes.h>
Full read and write access using the sequence protocol: see
detail::sequence_accessorProtected Types
-
using
iterator_category= std::random_access_iterator_tag¶
-
using
reference= sequence_accessor¶
-
using
pointer= arrow_proxy<const sequence_accessor>¶
-
using
iterator_category= std::random_access_iterator_tag
-
using
value_type= object
-
using
reference= sequence_accessor
-
using
pointer= arrow_proxy<const sequence_accessor>
Protected Functions
-
inline void
increment()¶
-
inline void
decrement()¶
-
inline bool
equal(const sequence_slow_readwrite &b) const¶
-
inline ssize_t
distance_to(const sequence_slow_readwrite &b) const¶
-
inline reference
dereference() const
-
inline void
increment()
-
inline void
decrement()
-
inline void
advance(ssize_t n)
-
inline bool
equal(const sequence_slow_readwrite &b) const
-
inline ssize_t
distance_to(const sequence_slow_readwrite &b) const
-
using
-
class
SequenceTestingListener: public testing::EmptyTestEventListener Public Functions
-
inline
SequenceTestingListener(std::vector<std::string> *vector, const char *id)
Protected Functions
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
-
inline virtual void
OnTestProgramEnd(const UnitTest&) override
-
inline virtual void
OnTestIterationStart(const UnitTest&, int) override
-
inline virtual void
OnTestIterationEnd(const UnitTest&, int) override
Private Functions
-
inline std::string
GetEventDescription(const char *method)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(SequenceTestingListener)
Private Members
-
std::vector<std::string> *
vector_
-
const char *const
id_
-
inline
-
class
set: public object, public object - #include <pytypes.h>
Public Functions
-
inline
set()
-
inline size_t
size() const
-
inline bool
empty() const
-
template<typename
T>
inline booladd(T &&val) const
-
inline void
clear() const
-
template<typename
T>
inline boolcontains(T &&val) const
-
inline
set()
-
inline size_t
size() const
-
inline bool
empty() const
-
template<typename
T>
inline booladd(T &&val) const
-
inline void
clear() const
-
template<typename
T>
inline boolcontains(T &&val) const
-
inline
-
template<typename
Type, typenameKey>
structset_caster - #include <stl.h>
Public Types
-
using
type= Type
-
using
key_conv= make_caster<Key>
-
using
type= Type
-
using
key_conv= make_caster<Key>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (type, _("Set[")+key_conv::name+_("]"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (type, _("Set[")+key_conv::name+_("]"))
Public Static Functions
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
using
-
template<size_t
k, typenameT>
structtesting::internal::SetArgRefereeAction - #include <gmock-actions.h>
Public Functions
-
template<typename ...
Args>
inline voidoperator()(Args&&... args) const
-
template<typename ...
Args>
inline voidoperator()(Args&&... args) const
Public Members
-
T
value
-
template<typename ...
-
template<size_t
N, typenameA, typename = void>
structtesting::internal::SetArgumentPointeeAction - #include <gmock-actions.h>
Public Functions
-
template<typename ...
Args>
inline voidoperator()(const Args&... args) const
-
template<typename ...
Args>
inline voidoperator()(const Args&... args) const
Public Members
-
A
value
-
template<typename ...
-
template<size_t
k, typenameI1, typenameI2>
structtesting::internal::SetArrayArgumentAction - #include <gmock-actions.h>
-
template<typename
T>
classtesting::internal::SetErrnoAndReturnAction - #include <gmock-actions.h>
Public Functions
-
inline
SetErrnoAndReturnAction(int errno_value, T result)
-
template<typename
Result, typenameArgumentTuple>
inline ResultPerform(const ArgumentTuple&) const
-
inline
SetErrnoAndReturnAction(int errno_value, T result)
-
template<typename
Result, typenameArgumentTuple>
inline ResultPerform(const ArgumentTuple&) const
-
inline
-
struct
Setup_should_be_spelled_SetUp
-
struct
Setup_should_be_spelled_SetUp
-
class
SetupEnvironment: public testing::Environment Public Functions
-
inline virtual void
SetUp() override
-
inline virtual void
-
class
SetupFailTest: public testing::Test Protected Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
-
class
testing::SetUpTestCaseTest: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
Protected Static Functions
-
static inline void
SetUpTestCase()
-
static inline void
TearDownTestCase()
Protected Static Attributes
-
static int
counter_= 0
-
inline virtual void
-
class
testing::SetUpTestSuiteTest: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
Protected Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
Protected Static Attributes
-
static int
counter_= 0
-
inline virtual void
-
struct
sibling - #include <attr.h>
Annotation indicating that a function is an overload associated with a given “sibling”.
Public Members
-
handle
value
-
handle
-
template<return_value_policy
policy>
classsimple_collector - #include <cast.h>
Helper class which collects only positional arguments for a Python function call.
A fancier version below can collect any argument, but this one is optimal for simple calls.
Public Functions
-
template<typename ...
Ts>
inline explicitsimple_collector(Ts&&... values)
-
inline const tuple &
args() const &
-
inline dict
kwargs() const
-
inline tuple
args() &&
-
inline object
call(PyObject *ptr) const Call a Python function and pass the collected arguments.
-
template<typename ...
Ts>
inline explicitsimple_collector(Ts&&... values)
-
inline const tuple &
args() const &
-
inline dict
kwargs() const
-
inline tuple
args() &&
-
inline object
call(PyObject *ptr) const Call a Python function and pass the collected arguments.
Private Members
-
tuple
m_args
-
template<typename ...
-
class
SkippedTest: public Test
-
class
slice: public object, public object - #include <pytypes.h>
Public Functions
-
inline bool
compute(size_t length, size_t *start, size_t *stop, size_t *step, size_t *slicelength) const
-
inline bool
compute(ssize_t length, ssize_t *start, ssize_t *stop, ssize_t *step, ssize_t *slicelength) const
-
inline bool
-
template<typename
T>
classtesting::gmock_function_mocker_test::StackInterface Subclassed by testing::gmock_function_mocker_test::LegacyMockStack< T >, testing::gmock_function_mocker_test::MockStack< T >
-
struct
testing::internal::ReturnRoundRobinAction::State Public Functions
-
inline T
Next()
-
inline T
Next()
-
inline T
-
struct
options::state Public Members
-
bool
show_user_defined_docstrings= true
-
bool
show_function_signatures= true
-
bool
-
struct
StatefulNamingFunctor Public Functions
-
inline
StatefulNamingFunctor()
-
inline std::string
operator()(const ::testing::TestParamInfo<int> &info)
Public Members
-
int
sum
-
inline
-
class
StatefulNamingTest: public testing::TestWithParam<int> Protected Functions
-
inline
StatefulNamingTest()
Protected Attributes
-
int
sum_
-
inline
-
template<typename
T>
classStaticAssertTypeEqTestHelper Public Functions
-
inline
StaticAssertTypeEqTestHelper()
-
inline
-
struct
stolen_t - #include <pytypes.h>
-
class
str: public object, public object - #include <pytypes.h>
Public Functions
-
inline
str(const char *c, size_t n)
-
inline
str(const char *c = "")
-
inline
str(const std::string &s)
-
inline explicit
str(const bytes &b)
-
inline explicit
str(handle h) Return a string representation of the object.
This is analogous to the
str()function in Python.
-
inline
operator std::string() const
-
inline
str(const char *c, size_t n)
-
inline
str(const char *c = "")
-
inline
str(const std::string &s)
-
explicit
str(const bytes &b)
-
inline explicit
str(handle h) Return a string representation of the object.
This is analogous to the
str()function in Python.
-
inline
operator std::string() const
Private Static Functions
-
static inline PyObject *
raw_str(PyObject *op) Return string representation always returns a new reference, even if already a str.
-
static inline PyObject *
raw_str(PyObject *op) Return string representation always returns a new reference, even if already a str.
-
inline
-
struct
str_attr - #include <pytypes.h>
Public Types
-
using
key_type= const char*
-
using
key_type= const char*
-
using
-
class
StreamableInGlobal Public Functions
-
inline virtual
~StreamableInGlobal()
-
inline virtual
-
struct
testing::internal::internal_stream_operator_without_lexical_name_lookup::StreamPrinter - #include <gtest-printers.h>
-
template<class
MockClass>
classtesting::StrictMock: private testing::internal::StrictMockImpl<MockClass>, public MockClass, private testing::internal::StrictMockImpl<MockClass>, public MockClass - #include <gmock-nice-strict.h>
Public Functions
-
inline
StrictMock()
-
template<typename
A>
inline explicitStrictMock(A &&arg)
-
template<typename
TArg1, typenameTArg2, typename ...An>
inlineStrictMock(TArg1 &&arg1, TArg2 &&arg2, An&&... args)
-
inline
StrictMock()
-
template<typename
A>
inline explicitStrictMock(A &&arg)
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock)
-
inline
-
template<typename
Base>
classtesting::internal::StrictMockImpl - #include <gmock-nice-strict.h>
Public Functions
-
inline
StrictMockImpl()
-
inline
~StrictMockImpl()
-
inline
StrictMockImpl()
-
inline
~StrictMockImpl()
-
inline
-
template<typename
StringType, boolIsView= false>
structstring_caster - #include <cast.h>
Public Types
-
using
CharT= typename StringType::value_type
-
using
CharT= typename StringType::value_type
Public Functions
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER(StringType, _(PYBIND11_STRING_NAME))
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER(StringType, _(PYBIND11_STRING_NAME))
Public Static Functions
-
static inline handle
cast(const StringType &src, return_value_policy, handle)
-
static inline handle
cast(const StringType &src, return_value_policy, handle)
Private Functions
-
template<typename
C= CharT>
inline boolload_bytes(enable_if_t<std::is_same<C, char>::value, handle> src)
-
template<typename
C= CharT>
inline boolload_bytes(enable_if_t<!std::is_same<C, char>::value, handle>)
-
template<typename
C= CharT>
inline boolload_bytes(enable_if_t<std::is_same<C, char>::value, handle> src)
-
template<typename
C= CharT>
inline boolload_bytes(enable_if_t<!std::is_same<C, char>::value, handle>)
-
using
-
template<typename
F>
structstrip_function_object - #include <common.h>
Public Types
-
using
type= typename remove_class<decltype(&F::operator())>::type
-
using
type= typename remove_class<decltype(&F::operator())>::type
-
using
-
class
SuccessfulTest: public Test
-
struct
testing::gmock_more_actions_test::SumOf5Functor Public Functions
-
inline int
operator()(int a, int b, int c, int d, int e)
-
inline int
-
struct
testing::gmock_more_actions_test::SumOf6Functor Public Functions
-
inline int
operator()(int a, int b, int c, int d, int e, int f)
-
inline int
-
class
TearDownFailTest: public testing::Test Protected Static Functions
-
static inline void
TearDownTestSuite()
-
static inline void
-
template<typename
T>
classtesting::gmock_function_mocker_test::TemplatedCopyable Public Functions
-
inline
TemplatedCopyable()
-
template<typename
U>
inlineTemplatedCopyable(const U &other)
-
inline
-
struct
TemplatedStreamableInFoo
-
class
testing::gmock_more_actions_test::TenArgConstructorClass Public Functions
-
inline
TenArgConstructorClass(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10)
Public Members
-
int
value_
-
inline
-
class
Test
-
class
testing::Test - #include <gtest.h>
Subclassed by bar::MixedUpTestSuiteTest, bar::MixedUpTestSuiteWithSameTestNameTest, CommonTest< T >, ContainerTest< T >, DetectNotInstantiatedTypesTest< T >, DynamicFixture, DynamicUnitTestFixture, ExpectFailureTest, FatalFailureInFixtureConstructorTest, FatalFailureInSetUpTest, foo::MixedUpTestSuiteTest, foo::MixedUpTestSuiteWithSameTestNameTest, FooTest, FooTest, FooTestFixture, GMockOutputTest, library1::NumericTest< T >, library2::NumericTest< T >, library2::TrimmedTest< T >, MacroNamingTestNonParametrized, NonFatalFailureInFixtureConstructorTest, NonFatalFailureInSetUpTest, NonParameterizedBaseTest, Predicate1Test, Predicate2Test, Predicate3Test, Predicate4Test, Predicate5Test, PropertyOne, PropertyTwo, ProtectedFixtureMethodsTest, SetupFailTest, TearDownFailTest, TEST_before_TEST_F_in_same_test_case, TEST_F_before_TEST_in_same_test_case, testing::CodeLocationForTESTF, testing::CodeLocationForTYPEDTEST< T >, testing::CodeLocationForTYPEDTESTP< T >, testing::CurrentTestInfoTest, testing::gmock_function_mocker_test::ExpectCallTest< T >, testing::gmock_function_mocker_test::FunctionMockerTest< T >, testing::gmock_function_mocker_test::MockMethodMockFunctionSignatureTest< F >, testing::gmock_function_mocker_test::OverloadedMockMethodTest< T >, testing::gmock_function_mocker_test::TemplateMockTest< T >, testing::internal::ListenerTest, testing::internal::TestSuiteWithCommentTest< T >, testing::internal::UnitTestRecordPropertyTestHelper, testing::ParseFlagsTest, testing::SetUpTestCaseTest, testing::SetUpTestSuiteTest, testing::TestInfoTest, testing::TestWithParam< T >, testing::TestWithParam< T >, testing::TestWithParam< int >, testing::TestWithParam< int >, testing::TestWithParam< MyEnums >, testing::TestWithParam< MyEnums >, testing::TestWithParam< MyType >, testing::TestWithParam< MyType >, testing::TestWithParam< std::string >, testing::TestWithParam< std::string >, TypedTest< T >, TypedTest< T >, TypedTest< T >, TypedTest1< T >, TypedTest2< T >, TypedTestP< T >, TypedTestP1< T >, TypedTestP2< T >, TypedTestSuitePStateTest, TypedTestWithNames< T >, TypedTestWithNames< T >, TypeParameterizedTestSuite< T >, TypeParametrizedTestWithNames< T >, TypeParamTest< T >, works_here::NotInstantiatedTypeTest< T >, works_here::NotUsedTypeTest< T >
Public Functions
-
virtual
~Test()
-
virtual
~Test()
Public Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
-
static inline void
TearDownTestCase()
-
static inline void
SetUpTestCase()
-
static bool
HasFatalFailure()
-
static bool
HasNonfatalFailure()
-
static bool
IsSkipped()
-
static inline bool
HasFailure()
-
static void
RecordProperty(const std::string &key, const std::string &value)
-
static void
RecordProperty(const std::string &key, int value)
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
-
static inline void
TearDownTestCase()
-
static inline void
SetUpTestCase()
-
static bool
HasFatalFailure()
-
static bool
HasNonfatalFailure()
-
static bool
IsSkipped()
-
static inline bool
HasFailure()
-
static void
RecordProperty(const std::string &key, const std::string &value)
-
static void
RecordProperty(const std::string &key, int value)
Protected Functions
-
Test()¶
-
virtual void
SetUp()¶
-
virtual void
TearDown()¶
-
Test()
-
virtual void
SetUp()
-
virtual void
TearDown()
Private Functions
-
virtual void
TestBody() = 0
-
void
Run()
-
inline void
DeleteSelf_()
-
inline virtual Setup_should_be_spelled_SetUp *
Setup()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(Test)
-
virtual void
TestBody() = 0
-
void
Run()
-
inline void
DeleteSelf_()
-
inline virtual Setup_should_be_spelled_SetUp *
Setup()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(Test)
Private Members
-
const std::unique_ptr<GTEST_FLAG_SAVER_>
gtest_flag_saver_
Private Static Functions
-
static bool
HasSameFixtureClass()
-
static bool
HasSameFixtureClass()
Friends
- friend class TestInfo
-
virtual
-
template<class ...
Args>
structtesting::internal::gmockpp::Test Public Static Attributes
-
static constexpr int
kArgs= sizeof...(Args)
-
static constexpr int
-
class
testing::TestEventListener - #include <gtest.h>
Subclassed by testing::EmptyTestEventListener, testing::EmptyTestEventListener, testing::internal::BriefUnitTestResultPrinter, testing::internal::EventRecordingListener, testing::internal::EventRecordingListener2, testing::internal::PrettyUnitTestResultPrinter, testing::internal::TestEventRepeater
Public Functions
-
inline virtual
~TestEventListener()
-
virtual void
OnTestProgramStart(const UnitTest &unit_test) = 0
-
virtual void
OnTestIterationStart(const UnitTest &unit_test, int iteration) = 0
-
virtual void
OnEnvironmentsSetUpStart(const UnitTest &unit_test) = 0
-
virtual void
OnEnvironmentsSetUpEnd(const UnitTest &unit_test) = 0
-
inline virtual void
OnTestSuiteStart(const TestSuite&)
-
inline virtual void
OnTestCaseStart(const TestCase&)
-
virtual void
OnTestStart(const TestInfo &test_info) = 0
-
virtual void
OnTestPartResult(const TestPartResult &test_part_result) = 0
-
virtual void
OnTestEnd(const TestInfo &test_info) = 0
-
inline virtual void
OnTestSuiteEnd(const TestSuite&)
-
inline virtual void
OnTestCaseEnd(const TestCase&)
-
virtual void
OnEnvironmentsTearDownStart(const UnitTest &unit_test) = 0
-
virtual void
OnEnvironmentsTearDownEnd(const UnitTest &unit_test) = 0
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) = 0
-
virtual void
OnTestProgramEnd(const UnitTest &unit_test) = 0
-
inline virtual
~TestEventListener()
-
virtual void
OnTestProgramStart(const UnitTest &unit_test) = 0
-
virtual void
OnTestIterationStart(const UnitTest &unit_test, int iteration) = 0
-
virtual void
OnEnvironmentsSetUpStart(const UnitTest &unit_test) = 0
-
virtual void
OnEnvironmentsSetUpEnd(const UnitTest &unit_test) = 0
-
inline virtual void
OnTestSuiteStart(const TestSuite&)
-
inline virtual void
OnTestCaseStart(const TestCase&)
-
virtual void
OnTestStart(const TestInfo &test_info) = 0
-
virtual void
OnTestPartResult(const TestPartResult &test_part_result) = 0
-
virtual void
OnTestEnd(const TestInfo &test_info) = 0
-
inline virtual void
OnTestSuiteEnd(const TestSuite&)
-
inline virtual void
OnTestCaseEnd(const TestCase&)
-
virtual void
OnEnvironmentsTearDownStart(const UnitTest &unit_test) = 0
-
virtual void
OnEnvironmentsTearDownEnd(const UnitTest &unit_test) = 0
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) = 0
-
virtual void
OnTestProgramEnd(const UnitTest &unit_test) = 0
-
inline virtual
-
class
testing::TestEventListeners - #include <gtest.h>
Public Functions
-
TestEventListeners()
-
~TestEventListeners()
-
void
Append(TestEventListener *listener)
-
TestEventListener *
Release(TestEventListener *listener)
-
inline TestEventListener *
default_result_printer() const
-
inline TestEventListener *
default_xml_generator() const
-
TestEventListeners()
-
~TestEventListeners()
-
void
Append(TestEventListener *listener)
-
TestEventListener *
Release(TestEventListener *listener)
-
inline TestEventListener *
default_result_printer() const
-
inline TestEventListener *
default_xml_generator() const
Private Functions
-
TestEventListener *
repeater()
-
void
SetDefaultResultPrinter(TestEventListener *listener)
-
void
SetDefaultXmlGenerator(TestEventListener *listener)
-
bool
EventForwardingEnabled() const
-
void
SuppressEventForwarding()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners)
-
TestEventListener *
repeater()
-
void
SetDefaultResultPrinter(TestEventListener *listener)
-
void
SetDefaultXmlGenerator(TestEventListener *listener)
-
bool
EventForwardingEnabled() const
-
void
SuppressEventForwarding()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventListeners)
Private Members
-
internal::TestEventRepeater *
repeater_
-
TestEventListener *
default_result_printer_
-
TestEventListener *
default_xml_generator_
Friends
- friend class TestSuite
- friend class TestInfo
- friend class internal::DefaultGlobalTestPartResultReporter
- friend class internal::NoExecDeathTest
- friend class internal::TestEventListenersAccessor
- friend class internal::UnitTestImpl
-
-
class
testing::internal::TestEventListenersAccessor Public Static Functions
-
static inline TestEventListener *
GetRepeater(TestEventListeners *listeners)
-
static inline void
SetDefaultResultPrinter(TestEventListeners *listeners, TestEventListener *listener)
-
static inline void
SetDefaultXmlGenerator(TestEventListeners *listeners, TestEventListener *listener)
-
static inline bool
EventForwardingEnabled(const TestEventListeners &listeners)
-
static inline void
SuppressEventForwarding(TestEventListeners *listeners)
-
static inline TestEventListener *
-
class
testing::internal::TestEventRepeater: public testing::TestEventListener Public Functions
-
inline
TestEventRepeater()
-
~TestEventRepeater() override
-
void
Append(TestEventListener *listener)
-
TestEventListener *
Release(TestEventListener *listener)
-
inline bool
forwarding_enabled() const
-
inline void
set_forwarding_enabled(bool enable)
-
virtual void
OnTestProgramStart(const UnitTest &unit_test) override
-
virtual void
OnTestIterationStart(const UnitTest &unit_test, int iteration) override
-
virtual void
OnEnvironmentsSetUpStart(const UnitTest &unit_test) override
-
virtual void
OnEnvironmentsSetUpEnd(const UnitTest &unit_test) override
-
void
OnTestCaseStart(const TestSuite ¶meter) override
-
virtual void
OnTestSuiteStart(const TestSuite ¶meter) override
-
virtual void
OnTestStart(const TestInfo &test_info) override
-
virtual void
OnTestPartResult(const TestPartResult &result) override
-
virtual void
OnTestEnd(const TestInfo &test_info) override
-
virtual void
OnTestCaseEnd(const TestCase ¶meter) override
-
virtual void
OnTestSuiteEnd(const TestSuite ¶meter) override
-
virtual void
OnEnvironmentsTearDownStart(const UnitTest &unit_test) override
-
virtual void
OnEnvironmentsTearDownEnd(const UnitTest &unit_test) override
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) override
-
virtual void
OnTestProgramEnd(const UnitTest &unit_test) override
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestEventRepeater)
-
inline
-
template<int
kExpectedCalls>
classTestGenerationEnvironment: public testing::Environment Public Functions
-
inline void
FixtureConstructorExecuted()
-
inline void
SetUpExecuted()
-
inline void
TearDownExecuted()
-
inline void
TestBodyExecuted()
-
inline virtual void
TearDown() override
Public Static Functions
-
static inline TestGenerationEnvironment *
Instance()
Private Functions
-
inline
TestGenerationEnvironment()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationEnvironment)
Private Members
-
int
fixture_constructor_count_
-
int
set_up_count_
-
int
tear_down_count_
-
int
test_body_count_
-
inline void
-
class
TestGenerationTest: public testing::TestWithParam<int> Public Types
-
enum [anonymous]
Values:
-
enumerator
PARAMETER_COUNT
-
enumerator
-
typedef TestGenerationEnvironment<PARAMETER_COUNT>
Environment
Public Functions
-
inline
TestGenerationTest()
-
inline virtual void
SetUp() override
-
inline virtual void
TearDown() override
Public Static Functions
-
static inline void
SetUpTestSuite()
-
static inline void
TearDownTestSuite()
Protected Attributes
-
int
current_parameter_
Protected Static Attributes
-
static vector<int>
collected_parameters_
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestGenerationTest)
-
enum [anonymous]
-
class
testing::TestInfo - #include <gtest.h>
Public Functions
-
~TestInfo()
-
inline const char *
test_suite_name() const
-
inline const char *
test_case_name() const
-
inline const char *
name() const
-
inline const char *
type_param() const
-
inline const char *
value_param() const
-
inline const char *
file() const
-
inline int
line() const
-
inline bool
is_in_another_shard() const
-
inline bool
should_run() const
-
inline bool
is_reportable() const
-
inline const TestResult *
result() const
-
~TestInfo()
-
inline const char *
test_suite_name() const
-
inline const char *
test_case_name() const
-
inline const char *
name() const
-
inline const char *
type_param() const
-
inline const char *
value_param() const
-
inline const char *
file() const
-
inline int
line() const
-
inline bool
is_in_another_shard() const
-
inline bool
should_run() const
-
inline bool
is_reportable() const
-
inline const TestResult *
result() const
Private Functions
-
TestInfo(const std::string &test_suite_name, const std::string &name, const char *a_type_param, const char *a_value_param, internal::CodeLocation a_code_location, internal::TypeId fixture_class_id, internal::TestFactoryBase *factory)
-
inline int
increment_death_test_count()
-
void
Run()
-
void
Skip()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo)
-
TestInfo(const std::string &test_suite_name, const std::string &name, const char *a_type_param, const char *a_value_param, internal::CodeLocation a_code_location, internal::TypeId fixture_class_id, internal::TestFactoryBase *factory)
-
inline int
increment_death_test_count()
-
void
Run()
-
void
Skip()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestInfo)
Private Members
-
const std::string
test_suite_name_
-
const std::string
name_
-
const std::unique_ptr<const ::std::string>
type_param_
-
const std::unique_ptr<const ::std::string>
value_param_
-
internal::CodeLocation
location_
-
const internal::TypeId
fixture_class_id_
-
bool
should_run_
-
bool
is_disabled_
-
bool
matches_filter_
-
bool
is_in_another_shard_
-
internal::TestFactoryBase *const
factory_
-
TestResult
result_
Private Static Functions
-
static inline void
ClearTestResult(TestInfo *test_info)
-
static inline void
ClearTestResult(TestInfo *test_info)
Friends
- friend class Test
- friend class TestSuite
- friend class internal::UnitTestImpl
- friend class internal::StreamingListenerTest
-
friend friend TestInfo * internal::MakeAndRegisterTestInfo (const char *test_suite_name, const char *name, const char *type_param, const char *value_param, internal::CodeLocation code_location, internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc, internal::TestFactoryBase *factory)
-
friend friend TestInfo * internal::MakeAndRegisterTestInfo (const char *test_suite_name, const char *name, const char *type_param, const char *value_param, internal::CodeLocation code_location, internal::TypeId fixture_class_id, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc, internal::TestFactoryBase *factory)
-
-
class
testing::TestInfoTest: public testing::Test Protected Static Functions
-
static inline const TestInfo *
GetTestInfo(const char *test_name)
-
static inline const TestResult *
GetTestResult(const TestInfo *test_info)
-
static inline const TestInfo *
-
class
TestingVector: public std::vector<int>
-
class
TestListener: public testing::EmptyTestEventListener Public Functions
-
inline
TestListener()
-
inline
TestListener(int *on_start_counter, bool *is_destroyed)
-
inline
~TestListener() override
Protected Functions
-
inline virtual void
OnTestProgramStart(const UnitTest&) override
Private Members
-
int *
on_start_counter_
-
bool *
is_destroyed_
-
inline
-
class
testing::TestProperty - #include <gtest.h>
Public Functions
-
inline
TestProperty(const std::string &a_key, const std::string &a_value)
-
inline const char *
key() const
-
inline const char *
value() const
-
inline void
SetValue(const std::string &new_value)
-
inline
TestProperty(const std::string &a_key, const std::string &a_value)
-
inline const char *
key() const
-
inline const char *
value() const
-
inline void
SetValue(const std::string &new_value)
Private Members
-
std::string
key_
-
std::string
value_
-
inline
-
class
testing::TestResult - #include <gtest.h>
Public Functions
-
TestResult()
-
~TestResult()
-
int
total_part_count() const
-
int
test_property_count() const
-
inline bool
Passed() const
-
bool
Skipped() const
-
bool
Failed() const
-
bool
HasFatalFailure() const
-
bool
HasNonfatalFailure() const
-
inline TimeInMillis
elapsed_time() const
-
inline TimeInMillis
start_timestamp() const
-
const TestPartResult &
GetTestPartResult(int i) const
-
const TestProperty &
GetTestProperty(int i) const
-
TestResult()
-
~TestResult()
-
int
total_part_count() const
-
int
test_property_count() const
-
inline bool
Passed() const
-
bool
Skipped() const
-
bool
Failed() const
-
bool
HasFatalFailure() const
-
bool
HasNonfatalFailure() const
-
inline TimeInMillis
elapsed_time() const
-
inline TimeInMillis
start_timestamp() const
-
const TestPartResult &
GetTestPartResult(int i) const
-
const TestProperty &
GetTestProperty(int i) const
Private Functions
-
inline const std::vector<TestPartResult> &
test_part_results() const
-
inline const std::vector<TestProperty> &
test_properties() const
-
inline void
set_start_timestamp(TimeInMillis start)
-
inline void
set_elapsed_time(TimeInMillis elapsed)
-
void
RecordProperty(const std::string &xml_element, const TestProperty &test_property)
-
void
AddTestPartResult(const TestPartResult &test_part_result)
-
inline int
death_test_count() const
-
inline int
increment_death_test_count()
-
void
ClearTestPartResults()
-
void
Clear()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult)
-
inline const std::vector<TestPartResult> &
test_part_results() const
-
inline const std::vector<TestProperty> &
test_properties() const
-
inline void
set_start_timestamp(TimeInMillis start)
-
inline void
set_elapsed_time(TimeInMillis elapsed)
-
void
RecordProperty(const std::string &xml_element, const TestProperty &test_property)
-
void
AddTestPartResult(const TestPartResult &test_part_result)
-
inline int
death_test_count() const
-
inline int
increment_death_test_count()
-
void
ClearTestPartResults()
-
void
Clear()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestResult)
Private Members
-
internal::Mutex
test_properties_mutex_
-
std::vector<TestPartResult>
test_part_results_
-
std::vector<TestProperty>
test_properties_
-
int
death_test_count_
-
TimeInMillis
start_timestamp_
-
TimeInMillis
elapsed_time_
Private Static Functions
-
static bool
ValidateTestProperty(const std::string &xml_element, const TestProperty &test_property)
-
static bool
ValidateTestProperty(const std::string &xml_element, const TestProperty &test_property)
Friends
- friend class TestInfo
- friend class TestSuite
- friend class UnitTest
- friend class internal::DefaultGlobalTestPartResultReporter
- friend class internal::ExecDeathTest
- friend class internal::TestResultAccessor
- friend class internal::UnitTestImpl
- friend class internal::WindowsDeathTest
- friend class internal::FuchsiaDeathTest
-
-
class
testing::TestSuite - #include <gtest.h>
Public Functions
-
TestSuite(const char *name, const char *a_type_param, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc)
-
virtual
~TestSuite()
-
inline const char *
name() const
-
inline const char *
type_param() const
-
inline bool
should_run() const
-
int
successful_test_count() const
-
int
skipped_test_count() const
-
int
failed_test_count() const
-
int
reportable_disabled_test_count() const
-
int
disabled_test_count() const
-
int
reportable_test_count() const
-
int
test_to_run_count() const
-
int
total_test_count() const
-
inline bool
Passed() const
-
inline bool
Failed() const
-
inline TimeInMillis
elapsed_time() const
-
inline TimeInMillis
start_timestamp() const
-
const TestInfo *
GetTestInfo(int i) const
-
inline const TestResult &
ad_hoc_test_result() const
-
TestSuite(const char *name, const char *a_type_param, internal::SetUpTestSuiteFunc set_up_tc, internal::TearDownTestSuiteFunc tear_down_tc)
-
virtual
~TestSuite()
-
inline const char *
name() const
-
inline const char *
type_param() const
-
inline bool
should_run() const
-
int
successful_test_count() const
-
int
skipped_test_count() const
-
int
failed_test_count() const
-
int
reportable_disabled_test_count() const
-
int
disabled_test_count() const
-
int
reportable_test_count() const
-
int
test_to_run_count() const
-
int
total_test_count() const
-
inline bool
Passed() const
-
inline bool
Failed() const
-
inline TimeInMillis
elapsed_time() const
-
inline TimeInMillis
start_timestamp() const
-
const TestInfo *
GetTestInfo(int i) const
-
inline const TestResult &
ad_hoc_test_result() const
Private Functions
-
inline std::vector<TestInfo*> &
test_info_list()
-
inline const std::vector<TestInfo*> &
test_info_list() const
-
TestInfo *
GetMutableTestInfo(int i)
-
inline void
set_should_run(bool should)
-
void
AddTestInfo(TestInfo *test_info)
-
void
ClearResult()
-
void
Run()
-
void
Skip()
-
inline void
RunSetUpTestSuite()
-
inline void
RunTearDownTestSuite()
-
void
ShuffleTests(internal::Random *random)
-
void
UnshuffleTests()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestSuite)
-
inline std::vector<TestInfo*> &
test_info_list()
-
inline const std::vector<TestInfo*> &
test_info_list() const
-
TestInfo *
GetMutableTestInfo(int i)
-
inline void
set_should_run(bool should)
-
void
AddTestInfo(TestInfo *test_info)
-
void
ClearResult()
-
void
Run()
-
void
Skip()
-
inline void
RunSetUpTestSuite()
-
inline void
RunTearDownTestSuite()
-
void
ShuffleTests(internal::Random *random)
-
void
UnshuffleTests()
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(TestSuite)
Private Members
-
std::string
name_
-
const std::unique_ptr<const ::std::string>
type_param_
-
std::vector<TestInfo*>
test_info_list_
-
std::vector<int>
test_indices_
-
internal::SetUpTestSuiteFunc
set_up_tc_
-
internal::TearDownTestSuiteFunc
tear_down_tc_
-
bool
should_run_
-
TimeInMillis
start_timestamp_
-
TimeInMillis
elapsed_time_
-
TestResult
ad_hoc_test_result_
Private Static Functions
-
static inline void
ClearTestSuiteResult(TestSuite *test_suite)
-
static inline bool
TestPassed(const TestInfo *test_info)
-
static inline bool
TestSkipped(const TestInfo *test_info)
-
static inline bool
TestFailed(const TestInfo *test_info)
-
static inline bool
TestReportableDisabled(const TestInfo *test_info)
-
static inline bool
TestDisabled(const TestInfo *test_info)
-
static inline bool
TestReportable(const TestInfo *test_info)
-
static inline bool
ShouldRunTest(const TestInfo *test_info)
-
static inline void
ClearTestSuiteResult(TestSuite *test_suite)
-
static inline bool
TestPassed(const TestInfo *test_info)
-
static inline bool
TestSkipped(const TestInfo *test_info)
-
static inline bool
TestFailed(const TestInfo *test_info)
-
static inline bool
TestReportableDisabled(const TestInfo *test_info)
-
static inline bool
TestDisabled(const TestInfo *test_info)
-
static inline bool
TestReportable(const TestInfo *test_info)
-
static inline bool
ShouldRunTest(const TestInfo *test_info)
Friends
- friend class Test
- friend class internal::UnitTestImpl
-
-
class
testing::internal::TestSuiteNameIs Public Functions
-
inline explicit
TestSuiteNameIs(const std::string &name)
-
inline bool
operator()(const TestSuite *test_suite) const
Private Members
-
std::string
name_
-
inline explicit
-
template<typename
T>
classTestWithParam: public testing::Test, public testing::WithParamInterface<T>, public testing::Test, public testing::WithParamInterface<T> - #include <gtest.h>
-
template<typename
Pattern>
structtesting::internal::ThisRefAdjuster - #include <gmock-function-mocker.h>
Public Types
-
class
ThrowListener: public testing::EmptyTestEventListener Private Functions
-
inline void
OnTestPartResult(const testing::TestPartResult &result) override
-
inline void
-
class
tuple: public object, public object - #include <pytypes.h>
Public Functions
-
inline explicit
tuple(size_t size = 0)
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::tuple_accessor
operator[](size_t index) const
-
inline detail::item_accessor
operator[](handle h) const
-
inline detail::tuple_iterator
begin() const
-
inline detail::tuple_iterator
end() const
-
inline explicit
tuple(size_t size = 0)
-
inline size_t
size() const
-
inline bool
empty() const
-
inline detail::tuple_accessor
operator[](size_t index) const
-
inline detail::item_accessor
operator[](handle h) const
-
inline detail::tuple_iterator
begin() const
-
inline detail::tuple_iterator
end() const
-
inline explicit
-
template<template<typename...> class
Tuple, typename ...Ts>
classtuple_caster - #include <cast.h>
Public Functions
-
inline bool
load(handle src, bool convert)
-
inline
operator type() &
-
inline
operator type() &&
-
inline bool
load(handle src, bool convert)
-
inline
operator type() &
-
inline
operator type() &&
Public Static Functions
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
-
template<typename
T>
static inline handlecast(T &&src, return_value_policy policy, handle parent)
Public Static Attributes
-
static constexpr auto
name= _("Tuple[") + concat(make_caster<Ts>::name...) + _("]")
Protected Functions
-
template<size_t...
Is>
inline typeimplicit_cast(index_sequence<Is...>) &¶
-
template<size_t...
Is>
inline typeimplicit_cast(index_sequence<Is...>) &&¶
-
template<size_t...
Is>
inline boolload_impl(const sequence &seq, bool convert, index_sequence<Is...>)¶
-
template<size_t...
Is>
inline typeimplicit_cast(index_sequence<Is...>) &
-
template<size_t...
Is>
inline typeimplicit_cast(index_sequence<Is...>) &&
-
template<size_t...
Is>
inline boolload_impl(const sequence &seq, bool convert, index_sequence<Is...>)
Protected Attributes
-
Tuple<make_caster<Ts>...>
subcasters¶
Protected Static Functions
-
static inline constexpr bool
load_impl(const sequence&, bool, index_sequence<>)¶
-
template<typename
T, size_t...Is>
static inline handlecast_impl(T &&src, return_value_policy policy, handle parent, index_sequence<Is...>)¶
-
static inline constexpr bool
load_impl(const sequence&, bool, index_sequence<>)
-
template<typename
T, size_t...Is>
static inline handlecast_impl(T &&src, return_value_policy policy, handle parent, index_sequence<Is...>)
Private Static Attributes
-
static constexpr auto
size= sizeof...(Ts)
-
inline bool
-
struct
tuple_item - #include <pytypes.h>
-
template<>
structcall_guard<T, Ts...>::type - #include <attr.h>
Public Members
-
T
guard= {}
-
call_guard<Ts...>::type
next= {}
-
T
-
template<typename
type, typenameSFINAE= void>
classtype_caster: public type_caster_base<type>, public type_caster_base<type> - #include <cast.h>
-
template<>
classtype_caster<bool> - #include <cast.h>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (bool, _("bool"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (bool, _("bool"))
Public Static Functions
-
static inline handle
cast(bool src, return_value_policy, handle)
-
static inline handle
cast(bool src, return_value_policy, handle)
-
inline bool
-
template<typename
CharT>
structtype_caster<CharT, enable_if_t<is_std_char_type<CharT>::value>> - #include <cast.h>
Public Types
-
using
StringType= std::basic_string<CharT>
-
using
StringCaster= type_caster<StringType>
-
using
cast_op_type= pybind11::detail::cast_op_type<_T>
-
using
StringType= std::basic_string<CharT>
-
using
StringCaster= type_caster<StringType>
-
using
cast_op_type= pybind11::detail::cast_op_type<_T>
Public Functions
-
inline bool
load(handle src, bool convert)
-
inline
operator CharT*()
-
inline
operator CharT&()
-
inline bool
load(handle src, bool convert)
-
inline
operator CharT*()
-
inline
operator CharT&()
Public Static Functions
-
static inline handle
cast(const CharT *src, return_value_policy policy, handle parent)
-
static inline handle
cast(CharT src, return_value_policy policy, handle parent)
-
static inline handle
cast(const CharT *src, return_value_policy policy, handle parent)
-
static inline handle
cast(CharT src, return_value_policy policy, handle parent)
Public Static Attributes
-
static constexpr auto
name= _(PYBIND11_STRING_NAME)
-
using
-
template<typename
Type, size_tSize>
structtype_caster<std::array<Type, Size>> : public array_caster<std::array<Type, Size>, Type, false, Size>, public array_caster<std::array<Type, Size>, Type, false, Size> - #include <stl.h>
-
template<typename
CharT, classTraits, classAllocator>
structtype_caster<std::basic_string<CharT, Traits, Allocator>, enable_if_t<is_std_char_type<CharT>::value>> : public string_caster<std::basic_string<CharT, Traits, Allocator>>, public string_caster<std::basic_string<CharT, Traits, Allocator>> - #include <cast.h>
-
template<typename
Rep, typenamePeriod>
classtype_caster<std::chrono::duration<Rep, Period>> : public duration_caster<std::chrono::duration<Rep, Period>>, public duration_caster<std::chrono::duration<Rep, Period>> - #include <chrono.h>
-
template<typename
Clock, typenameDuration>
classtype_caster<std::chrono::time_point<Clock, Duration>> : public duration_caster<std::chrono::time_point<Clock, Duration>>, public duration_caster<std::chrono::time_point<Clock, Duration>> - #include <chrono.h>
-
template<typename
Duration>
classtype_caster<std::chrono::time_point<std::chrono::system_clock, Duration>> - #include <chrono.h>
Public Types
-
typedef std::chrono::time_point<std::chrono::system_clock, Duration>
type
-
typedef std::chrono::time_point<std::chrono::system_clock, Duration>
type
Public Functions
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER (type, _("datetime.datetime"))
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER (type, _("datetime.datetime"))
Public Static Functions
-
static inline handle
cast(const std::chrono::time_point<std::chrono::system_clock, Duration> &src, return_value_policy, handle)
-
static inline handle
cast(const std::chrono::time_point<std::chrono::system_clock, Duration> &src, return_value_policy, handle)
-
typedef std::chrono::time_point<std::chrono::system_clock, Duration>
-
template<typename
T>
classtype_caster<std::complex<T>> - #include <complex.h>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (std::complex< T >, _("complex"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (std::complex< T >, _("complex"))
Public Static Functions
-
static inline handle
cast(const std::complex<T> &src, return_value_policy, handle)
-
static inline handle
cast(const std::complex<T> &src, return_value_policy, handle)
-
inline bool
-
template<typename
Type, typenameAlloc>
structtype_caster<std::deque<Type, Alloc>> : public list_caster<std::deque<Type, Alloc>, Type>, public list_caster<std::deque<Type, Alloc>, Type> - #include <stl.h>
-
template<typename
Return, typename ...Args>
structtype_caster<std::function<Return(Args...)>> - #include <functional.h>
Public Types
-
using
retval_type= conditional_t<std::is_same<Return, void>::value, void_type, Return>
-
using
retval_type= conditional_t<std::is_same<Return, void>::value, void_type, Return>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (type, _("Callable[[")+concat(make_caster< Args >::name...)+_("], ")+make_caster< retval_type >::name+_("]"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (type, _("Callable[[")+concat(make_caster< Args >::name...)+_("], ")+make_caster< retval_type >::name+_("]"))
Public Static Functions
-
template<typename
Func>
static inline handlecast(Func &&f_, return_value_policy policy, handle)
-
template<typename
Func>
static inline handlecast(Func &&f_, return_value_policy policy, handle)
-
using
-
template<typename
Type, typenameAlloc>
structtype_caster<std::list<Type, Alloc>> : public list_caster<std::list<Type, Alloc>, Type>, public list_caster<std::list<Type, Alloc>, Type> - #include <stl.h>
-
template<typename
Key, typenameValue, typenameCompare, typenameAlloc>
structtype_caster<std::map<Key, Value, Compare, Alloc>> : public map_caster<std::map<Key, Value, Compare, Alloc>, Key, Value>, public map_caster<std::map<Key, Value, Compare, Alloc>, Key, Value> - #include <stl.h>
-
template<>
classtype_caster<std::nullptr_t> : public void_caster<std::nullptr_t>, public void_caster<std::nullptr_t> - #include <cast.h>
-
template<typename
T1, typenameT2>
classtype_caster<std::pair<T1, T2>> : public tuple_caster<std::pair, T1, T2>, public tuple_caster<std::pair, T1, T2> - #include <cast.h>
-
template<typename
type>
classtype_caster<std::reference_wrapper<type>> - #include <cast.h>
Public Types
-
using
cast_op_type= std::reference_wrapper<type>
-
using
cast_op_type= std::reference_wrapper<type>
Public Functions
-
inline bool
load(handle src, bool convert)
-
inline
operator std::reference_wrapper<type>()
-
inline bool
load(handle src, bool convert)
-
inline
operator std::reference_wrapper<type>()
Public Static Functions
-
static inline handle
cast(const std::reference_wrapper<type> &src, return_value_policy policy, handle parent)
-
static inline handle
cast(const std::reference_wrapper<type> &src, return_value_policy policy, handle parent)
Public Static Attributes
-
static constexpr auto
name= caster_t::name
Private Members
-
caster_t
subcaster
-
using
-
template<typename
Key, typenameCompare, typenameAlloc>
structtype_caster<std::set<Key, Compare, Alloc>> : public set_caster<std::set<Key, Compare, Alloc>, Key>, public set_caster<std::set<Key, Compare, Alloc>, Key> - #include <stl.h>
- #include <cast.h>
Specialize for the common std::shared_ptr, so users don’t need to.
-
template<typename ...
Ts>
classtype_caster<std::tuple<Ts...>> : public tuple_caster<std::tuple, Ts...>, public tuple_caster<std::tuple, Ts...> - #include <cast.h>
-
template<typename
type, typenamedeleter>
classtype_caster<std::unique_ptr<type, deleter>> : public move_only_holder_caster<type, std::unique_ptr<type, deleter>>, public move_only_holder_caster<type, std::unique_ptr<type, deleter>> - #include <cast.h>
-
template<typename
Key, typenameValue, typenameHash, typenameEqual, typenameAlloc>
structtype_caster<std::unordered_map<Key, Value, Hash, Equal, Alloc>> : public map_caster<std::unordered_map<Key, Value, Hash, Equal, Alloc>, Key, Value>, public map_caster<std::unordered_map<Key, Value, Hash, Equal, Alloc>, Key, Value> - #include <stl.h>
-
template<typename
Key, typenameHash, typenameEqual, typenameAlloc>
structtype_caster<std::unordered_set<Key, Hash, Equal, Alloc>> : public set_caster<std::unordered_set<Key, Hash, Equal, Alloc>, Key>, public set_caster<std::unordered_set<Key, Hash, Equal, Alloc>, Key> - #include <stl.h>
-
template<typename
Type>
structtype_caster<std::valarray<Type>> : public array_caster<std::valarray<Type>, Type, true>, public array_caster<std::valarray<Type>, Type, true> - #include <stl.h>
-
template<typename
Type, typenameAlloc>
structtype_caster<std::vector<Type, Alloc>> : public list_caster<std::vector<Type, Alloc>, Type>, public list_caster<std::vector<Type, Alloc>, Type> - #include <stl.h>
-
template<typename
T>
classtype_caster<T, enable_if_t<is_pyobject<T>::value>> : public pyobject_caster<T>, public pyobject_caster<T> - #include <cast.h>
-
template<typename
T>
structtype_caster<T, enable_if_t<std::is_arithmetic<T>::value && !is_std_char_type<T>::value>> - #include <cast.h>
Public Types
-
using
_py_type_0= conditional_t<sizeof(T) <= sizeof(long), long, long long>
-
using
_py_type_1= conditional_t<std::is_signed<T>::value, _py_type_0, typename std::make_unsigned<_py_type_0>::type>
-
using
py_type= conditional_t<std::is_floating_point<T>::value, double, _py_type_1>
-
using
_py_type_0= conditional_t<sizeof(T) <= sizeof(long), long, long long>
-
using
_py_type_1= conditional_t<std::is_signed<T>::value, _py_type_0, typename std::make_unsigned<_py_type_0>::type>
-
using
py_type= conditional_t<std::is_floating_point<T>::value, double, _py_type_1>
Public Functions
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (T, _< std::is_integral< T >::value >("int", "float"))
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (T, _< std::is_integral< T >::value >("int", "float"))
Public Static Functions
-
template<typename
U= T>
static inline std::enable_if<std::is_floating_point<U>::value, handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value && (sizeof(U) <= sizeof(long)), handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value && (sizeof(U) <= sizeof(unsigned long)), handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value && (sizeof(U) > sizeof(long)), handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value && (sizeof(U) > sizeof(unsigned long)), handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<std::is_floating_point<U>::value, handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value && (sizeof(U) <= sizeof(long)), handle>::typecast(U src, return_value_policy, handle)
-
template<typename
U= T>
static inline std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value && (sizeof(U) <= sizeof(unsigned long)), handle>::typecast(U src, return_value_policy, handle)
-
using
-
template<typename
Type>
structtype_caster<Type, enable_if_t<is_eigen_dense_map<Type>::value>> : public eigen_map_caster<Type>, public eigen_map_caster<Type> - #include <eigen.h>
-
template<typename
Type>
structtype_caster<Type, enable_if_t<is_eigen_dense_plain<Type>::value>> - #include <eigen.h>
Public Types
-
using
Scalar= typename Type::Scalar
-
using
props= EigenProps<Type>
-
using
cast_op_type= movable_cast_op_type<T>
-
using
Scalar= typename Type::Scalar
-
using
props= EigenProps<Type>
-
using
cast_op_type= movable_cast_op_type<T>
Public Functions
-
inline bool
load(handle src, bool convert)
-
inline
operator Type*()
-
inline
operator Type&()
-
inline
operator Type&&() &&
-
inline bool
load(handle src, bool convert)
-
inline
operator Type*()
-
inline
operator Type&()
-
inline
operator Type&&() &&
Public Static Functions
-
static inline handle
cast(Type &&src, return_value_policy, handle parent)
-
static inline handle
cast(const Type &&src, return_value_policy, handle parent)
-
static inline handle
cast(Type &src, return_value_policy policy, handle parent)
-
static inline handle
cast(const Type &src, return_value_policy policy, handle parent)
-
static inline handle
cast(Type *src, return_value_policy policy, handle parent)
-
static inline handle
cast(const Type *src, return_value_policy policy, handle parent)
-
static inline handle
cast(Type &&src, return_value_policy, handle parent)
-
static inline handle
cast(const Type &&src, return_value_policy, handle parent)
-
static inline handle
cast(Type &src, return_value_policy policy, handle parent)
-
static inline handle
cast(const Type &src, return_value_policy policy, handle parent)
-
static inline handle
cast(Type *src, return_value_policy policy, handle parent)
-
static inline handle
cast(const Type *src, return_value_policy policy, handle parent)
Public Static Attributes
-
static constexpr auto
name= props::descriptor
Private Members
-
Type
value
Private Static Functions
-
template<typename
CType>
static inline handlecast_impl(CType *src, return_value_policy policy, handle parent)
-
template<typename
CType>
static inline handlecast_impl(CType *src, return_value_policy policy, handle parent)
-
using
-
template<typename
Type>
structtype_caster<Type, enable_if_t<is_eigen_other<Type>::value>> - #include <eigen.h>
Public Functions
-
bool
load(handle, bool) = delete
-
operator Type() = delete
-
bool
load(handle, bool) = delete
-
operator Type() = delete
Public Static Functions
-
static inline handle
cast(const Type &src, return_value_policy, handle)
-
static inline handle
cast(const Type *src, return_value_policy policy, handle parent)
-
static inline handle
cast(const Type &src, return_value_policy, handle)
-
static inline handle
cast(const Type *src, return_value_policy policy, handle parent)
Public Static Attributes
-
static constexpr auto
name= props::descriptor
-
bool
-
template<typename
Type>
structtype_caster<Type, enable_if_t<is_eigen_sparse<Type>::value>> - #include <eigen.h>
Public Types
-
typedef Type::Scalar
Scalar
-
remove_reference_t< decltype(*std::declval< Type >).outerIndexPtr())> StorageIndex
-
typedef Type::Index
Index
-
typedef Type::Scalar
Scalar
-
remove_reference_t< decltype(*std::declval< Type >).outerIndexPtr())> StorageIndex
-
typedef Type::Index
Index
Public Functions
-
inline bool
load(handle src, bool)
-
npy_format_descriptor< Scalar >::name _ ("]"))
-
inline bool
load(handle src, bool)
-
npy_format_descriptor< Scalar >::name _ ("]"))
Public Static Functions
-
static inline handle
cast(const Type &src, return_value_policy, handle)
-
static inline handle
cast(const Type &src, return_value_policy, handle)
Public Static Attributes
-
static constexpr bool
rowMajor= Type::IsRowMajor
-
typedef Type::Scalar
-
template<typename
T, ssize_tDim>
structtype_caster<unchecked_mutable_reference<T, Dim>> : public type_caster<unchecked_reference<T, Dim>>, public type_caster<unchecked_reference<T, Dim>> - #include <numpy.h>
-
template<typename
T, ssize_tDim>
structtype_caster<unchecked_reference<T, Dim>> - #include <numpy.h>
Subclassed by type_caster< unchecked_mutable_reference< T, Dim > >, type_caster< unchecked_mutable_reference< T, Dim > >
-
template<>
classtype_caster<value_and_holder> - #include <init.h>
Public Functions
-
inline bool
load(handle h, bool)
-
inline
operator value_and_holder&()
-
inline bool
load(handle h, bool)
-
inline
operator value_and_holder&()
Public Static Attributes
-
static constexpr auto
name= _<value_and_holder>()
Private Members
-
value_and_holder *
value= nullptr
-
inline bool
-
template<>
classtype_caster<void> : public type_caster<void_type>, public type_caster<void_type> - #include <cast.h>
Public Types
-
using
cast_op_type= void*&
-
using
cast_op_type= void*&
Public Functions
-
inline bool
load(handle h, bool)
-
inline
operator void*&()
-
inline bool
load(handle h, bool)
-
inline
operator void*&()
Public Static Functions
-
static inline handle
cast(const void *ptr, return_value_policy, handle)
-
static inline handle
cast(const void *ptr, return_value_policy, handle)
Public Static Attributes
-
static constexpr auto
name= _("capsule")
Private Members
-
void *
value= nullptr
-
using
-
template<>
classtype_caster<void_type> : public void_caster<void_type>, public void_caster<void_type> - #include <cast.h>
Subclassed by type_caster< void >, type_caster< void >
-
template<typename
type>
classtype_caster_base: public type_caster_generic, public type_caster_generic - #include <cast.h>
Generic type caster for objects stored on the heap.
Subclassed by copyable_holder_caster< type, holder_type >, copyable_holder_caster< type, holder_type >, type_caster< type, SFINAE >, type_caster< type, SFINAE >, type_caster< type >, type_caster< type >
Public Types
-
using
cast_op_type= detail::cast_op_type<T>
-
using
cast_op_type= detail::cast_op_type<T>
Public Functions
-
inline
type_caster_base()
-
inline explicit
type_caster_base(const std::type_info &info)
-
inline
operator itype*()
-
inline
operator itype&()
-
inline
type_caster_base()
-
inline explicit
type_caster_base(const std::type_info &info)
-
inline
operator itype*()
-
inline
operator itype&()
Public Static Functions
-
static inline handle
cast(const itype &src, return_value_policy policy, handle parent)
-
static inline handle
cast(itype &&src, return_value_policy, handle parent)
-
static inline handle
cast(const itype *src, return_value_policy policy, handle parent)
-
static inline handle
cast(const itype &src, return_value_policy policy, handle parent)
-
static inline handle
cast(itype &&src, return_value_policy, handle parent)
-
static inline handle
cast(const itype *src, return_value_policy policy, handle parent)
Protected Types
-
using
Constructor= void *(*)(const void*)¶
-
using
Constructor= void *(*)(const void*)
Protected Static Functions
-
template<typename T, typename = enable_if_t<is_copy_constructible<T>::value>> static inline auto make_copy_constructor (const T *x) -> decltype(new T(*x), Constructor
-
template<typename T, typename = enable_if_t<std::is_move_constructible<T>::value>> static inline auto make_move_constructor (const T *x) -> decltype(new T(std::move(*const_cast< T *>(x))), Constructor
-
static inline Constructor
make_copy_constructor(...)¶
-
static inline Constructor
make_move_constructor(...)¶
-
template<typename T, typename = enable_if_t<is_copy_constructible<T>::value>> static inline auto make_copy_constructor (const T *x) -> decltype(new T(*x), Constructor
-
template<typename T, typename = enable_if_t<std::is_move_constructible<T>::value>> static inline auto make_move_constructor (const T *x) -> decltype(new T(std::move(*const_cast< T *>(x))), Constructor
-
static inline Constructor
make_copy_constructor(...)
-
static inline Constructor
make_move_constructor(...)
-
using
-
class
type_caster_generic - #include <cast.h>
Subclassed by type_caster_base< type >, type_caster_base< type >, type_caster_base< StringType >, type_caster_base< StringType >, type_caster_base< T >, type_caster_base< T >
Public Functions
-
inline PYBIND11_NOINLINE
type_caster_generic(const std::type_info &type_info)
-
inline
type_caster_generic(const type_info *typeinfo)
-
inline bool
load(handle src, bool convert)
-
inline void
load_value(value_and_holder &&v_h)
-
inline bool
try_implicit_casts(handle src, bool convert)
-
inline bool
try_direct_conversions(handle src)
-
inline void
check_holder_compat()
-
inline PYBIND11_NOINLINE bool try_load_foreign_module_local (handle src) Try to load with foreign typeinfo, if available.
Used when there is no native typeinfo, or when the native one wasn’t able to produce a value.
-
template<typename ThisT> inline PYBIND11_NOINLINE bool load_impl (handle src, bool convert)
-
inline PYBIND11_NOINLINE
type_caster_generic(const std::type_info &type_info)
-
inline
type_caster_generic(const type_info *typeinfo)
-
inline bool
load(handle src, bool convert)
-
inline void
load_value(value_and_holder &&v_h)
-
inline bool
try_implicit_casts(handle src, bool convert)
-
inline bool
try_direct_conversions(handle src)
-
inline void
check_holder_compat()
-
inline PYBIND11_NOINLINE bool try_load_foreign_module_local (handle src) Try to load with foreign typeinfo, if available.
Used when there is no native typeinfo, or when the native one wasn’t able to produce a value.
-
template<typename ThisT> inline PYBIND11_NOINLINE bool load_impl (handle src, bool convert)
Public Members
-
const type_info *
typeinfo= nullptr
-
const std::type_info *
cpptype= nullptr
-
void *
value= nullptr
Public Static Functions
-
static inline PYBIND11_NOINLINE handle cast (const void *_src, return_value_policy policy, handle parent, const detail::type_info *tinfo, void *(*copy_constructor)(const void *), void *(*move_constructor)(const void *), const void *existing_holder=nullptr)
-
static inline PYBIND11_NOINLINE void * local_load (PyObject *src, const type_info *ti)
-
static inline PYBIND11_NOINLINE std::pair< const void *, const type_info * > src_and_type (const void *src, const std::type_info &cast_type, const std::type_info *rtti_type=nullptr)
-
static inline PYBIND11_NOINLINE handle cast (const void *_src, return_value_policy policy, handle parent, const detail::type_info *tinfo, void *(*copy_constructor)(const void *), void *(*move_constructor)(const void *), const void *existing_holder=nullptr)
-
static inline PYBIND11_NOINLINE void * local_load (PyObject *src, const type_info *ti)
-
static inline PYBIND11_NOINLINE std::pair< const void *, const type_info * > src_and_type (const void *src, const std::type_info &cast_type, const std::type_info *rtti_type=nullptr)
-
inline PYBIND11_NOINLINE
-
struct
type_equal_to - #include <internals.h>
Public Functions
-
inline bool
operator()(const std::type_index &lhs, const std::type_index &rhs) const
-
inline bool
operator()(const std::type_index &lhs, const std::type_index &rhs) const
-
inline bool
-
struct
type_hash - #include <internals.h>
-
struct
type_info - #include <internals.h>
Additional type information which does not fit into the PyTypeObject.
Changes to this struct also require bumping
PYBIND11_INTERNALS_VERSION.Public Members
-
PyTypeObject *
type
-
const std::type_info *
cpptype
-
size_t
type_size
-
size_t
type_align
-
size_t
holder_size_in_ptrs
-
void *(*
operator_new)(size_t)
-
void (*
init_instance)(instance*, const void*)
-
void (*
dealloc)(value_and_holder &v_h)
-
std::vector<PyObject *(*)(PyObject*, PyTypeObject*)>
implicit_conversions
-
std::vector<std::pair<const std::type_info*, void *(*)(void*)>>
implicit_casts
-
std::vector<bool (*)(PyObject*, void*&)> *
direct_conversions
-
buffer_info *(* get_buffer )(PyObject *, void *) = nullptr
-
void *
get_buffer_data= nullptr
-
void *(* module_local_load )(PyObject *, const type_info *) = nullptr
-
bool
simple_type
-
bool
simple_ancestors
-
bool
default_holder
-
bool
module_local
-
PyTypeObject *
-
template<typename...>
structtype_list - #include <common.h>
Helper template which holds a list of types.
-
struct
type_record - #include <attr.h>
Special data structure which (temporarily) holds metadata about a bound class.
Public Functions
-
inline PYBIND11_NOINLINE
type_record()
-
inline PYBIND11_NOINLINE void add_base (const std::type_info &base, void *(*caster)(void *))
-
inline PYBIND11_NOINLINE
type_record()
-
inline PYBIND11_NOINLINE void add_base (const std::type_info &base, void *(*caster)(void *))
Public Members
-
handle
scope Handle to the parent scope.
-
const char *
name= nullptr Name of the class.
-
const std::type_info *
type= nullptr
-
size_t
type_size= 0 How large is the underlying C++ type?
-
size_t
type_align= 0 What is the alignment of the underlying C++ type?
-
size_t
holder_size= 0 How large is the type’s holder?
-
void *(* operator_new )(size_t) = nullptr The global operator new can be overridden with a class-specific variant.
-
void(* init_instance )(instance *, const void *) = nullptr Function pointer to class_<..>::init_instance.
-
void(* dealloc )(detail::value_and_holder &) = nullptr Function pointer to class_<..>::dealloc.
-
list
bases List of base classes of the newly created type.
-
const char *
doc= nullptr Optional docstring.
-
handle
metaclass Custom metaclass (optional)
-
bool
multiple_inheritance Multiple inheritance marker.
-
bool
dynamic_attr Does the class manage a dict?
-
bool
buffer_protocol Does the class implement the buffer protocol?
-
bool
default_holder Is the default (unique_ptr) holder type used?
-
bool
module_local Is the class definition local to the module shared object?
-
inline PYBIND11_NOINLINE
-
template<typename
T>
classTypedTest: public Test, public testing::Test, public testing::Test, public testing::Test, public Test
-
class
TypedTestNames Public Static Functions
-
template<typename
T>
static inline std::stringGetName(int i)
-
template<typename
T>
static inline std::stringGetName(int i)
-
template<typename
-
class
TypedTestPNames Public Static Functions
-
template<typename
T>
static inline std::stringGetName(int i)
-
template<typename
-
class
TypedTestSuitePStateTest: public testing::Test Protected Functions
-
inline virtual void
SetUp() override
Protected Attributes
-
TypedTestSuitePState
state_
-
inline virtual void
-
class
TypeParametrizedTestNames Public Static Functions
-
template<typename
T>
static inline std::stringGetName(int i)
-
template<typename
-
struct
testing::gmock_more_actions_test::UnaryFunctor Public Functions
-
inline int
operator()(bool x)
-
inline int
-
template<typename
T, ssize_tDims>
classunchecked_mutable_reference: public unchecked_reference<T, Dims>, public unchecked_reference<T, Dims> - #include <numpy.h>
Public Functions
-
template<typename ...
Ix>
inline T &operator()(Ix... index) Mutable, unchecked access to data at the given indices.
-
template<ssize_t
D= Dims, typename = enable_if_t<D == 1 || Dynamic>>
inline T &operator[](ssize_t index) Mutable, unchecked access data at the given index; this operator only participates if the reference is to a 1-dimensional array (or has runtime dimensions).
When present, this is exactly equivalent to
obj(index).
-
template<typename ...
Ix>
inline T *mutable_data(Ix... ix) Mutable pointer access to the data at the given indices.
-
template<typename ...
Ix>
inline T &operator()(Ix... index) Mutable, unchecked access to data at the given indices.
-
template<ssize_t
D= Dims, typename = enable_if_t<D == 1 || Dynamic>>
inline T &operator[](ssize_t index) Mutable, unchecked access data at the given index; this operator only participates if the reference is to a 1-dimensional array (or has runtime dimensions).
When present, this is exactly equivalent to
obj(index).
Private Types
-
using
ConstBase= unchecked_reference<T, Dims>
-
using
ConstBase= unchecked_reference<T, Dims>
Friends
- friend class pybind11::array
-
template<typename ...
-
template<typename
T, ssize_tDims>
classunchecked_reference - #include <numpy.h>
Proxy class providing unsafe, unchecked const access to array data.
This is constructed through the
unchecked<T, N>()method ofarrayor theunchecked<N>()method ofarray_t<T>.Dimswill be -1 for dimensions determined at runtime.Subclassed by unchecked_mutable_reference< T, Dims >, unchecked_mutable_reference< T, Dims >
Public Functions
-
template<typename ...
Ix>
inline const T &operator()(Ix... index) const Unchecked const reference access to data at the given indices.
For a compile-time known number of dimensions, this requires the correct number of arguments; for run-time dimensionality, this is not checked (and so is up to the caller to use safely).
-
template<ssize_t
D= Dims, typename = enable_if_t<D == 1 || Dynamic>>
inline const T &operator[](ssize_t index) const Unchecked const reference access to data; this operator only participates if the reference is to a 1-dimensional array.
When present, this is exactly equivalent to
obj(index).
-
template<typename ...
Ix>
inline const T *data(Ix... ix) const Pointer access to the data at the given indices.
-
inline ssize_t
ndim() const Returns the number of dimensions of the array.
-
template<bool
Dyn= Dynamic>
inline enable_if_t<!Dyn, ssize_t>size() const Returns the total number of elements in the referenced array, i.e. the product of the shapes.
-
template<bool
Dyn= Dynamic>
inline enable_if_t<Dyn, ssize_t>size() const
-
inline ssize_t
nbytes() const Returns the total number of bytes used by the referenced data.
Note that the actual span in memory may be larger if the referenced array has non-contiguous strides (e.g. for a slice).
-
template<typename ...
Ix>
inline const T &operator()(Ix... index) const Unchecked const reference access to data at the given indices.
For a compile-time known number of dimensions, this requires the correct number of arguments; for run-time dimensionality, this is not checked (and so is up to the caller to use safely).
-
template<ssize_t
D= Dims, typename = enable_if_t<D == 1 || Dynamic>>
inline const T &operator[](ssize_t index) const Unchecked const reference access to data; this operator only participates if the reference is to a 1-dimensional array.
When present, this is exactly equivalent to
obj(index).
-
template<typename ...
Ix>
inline const T *data(Ix... ix) const Pointer access to the data at the given indices.
-
inline ssize_t
ndim() const Returns the number of dimensions of the array.
-
template<bool
Dyn= Dynamic>
inline enable_if_t<!Dyn, ssize_t>size() const Returns the total number of elements in the referenced array, i.e. the product of the shapes.
-
template<bool
Dyn= Dynamic>
inline enable_if_t<Dyn, ssize_t>size() const
-
inline ssize_t
nbytes() const Returns the total number of bytes used by the referenced data.
Note that the actual span in memory may be larger if the referenced array has non-contiguous strides (e.g. for a slice).
Public Static Functions
-
static inline constexpr ssize_t
itemsize() Returns the item size, i.e. sizeof(T)
-
static inline constexpr ssize_t
itemsize() Returns the item size, i.e. sizeof(T)
Protected Functions
-
template<bool
Dyn= Dynamic>
inlineunchecked_reference(const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t<!Dyn, ssize_t>)¶
-
template<bool
Dyn= Dynamic>
inlineunchecked_reference(const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t<Dyn, ssize_t> dims)¶
Protected Attributes
-
const unsigned char *
data_¶
Friends
- friend class pybind11::array
-
template<typename ...
-
struct
undefined_t - #include <operators.h>
Type for an unused type slot.
-
class
testing::UnitTest - #include <gtest.h>
Public Functions
-
int Run () GTEST_MUST_USE_RESULT_
-
const char *
original_working_dir() const
-
const TestSuite * current_test_suite () const GTEST_LOCK_EXCLUDED_(mutex_)
-
const TestCase * current_test_case () const GTEST_LOCK_EXCLUDED_(mutex_)
-
const TestInfo * current_test_info () const GTEST_LOCK_EXCLUDED_(mutex_)
-
int
random_seed() const
-
internal::ParameterizedTestSuiteRegistry & parameterized_test_registry () GTEST_LOCK_EXCLUDED_(mutex_)
-
int
successful_test_suite_count() const
-
int
failed_test_suite_count() const
-
int
total_test_suite_count() const
-
int
test_suite_to_run_count() const
-
int
successful_test_case_count() const
-
int
failed_test_case_count() const
-
int
total_test_case_count() const
-
int
test_case_to_run_count() const
-
int
successful_test_count() const
-
int
skipped_test_count() const
-
int
failed_test_count() const
-
int
reportable_disabled_test_count() const
-
int
disabled_test_count() const
-
int
reportable_test_count() const
-
int
total_test_count() const
-
int
test_to_run_count() const
-
TimeInMillis
start_timestamp() const
-
TimeInMillis
elapsed_time() const
-
bool
Passed() const
-
bool
Failed() const
-
const TestSuite *
GetTestSuite(int i) const
-
const TestCase *
GetTestCase(int i) const
-
const TestResult &
ad_hoc_test_result() const
-
TestEventListeners &
listeners()
-
int Run () GTEST_MUST_USE_RESULT_
-
const char *
original_working_dir() const
-
const TestSuite * current_test_suite () const GTEST_LOCK_EXCLUDED_(mutex_)
-
const TestCase * current_test_case () const GTEST_LOCK_EXCLUDED_(mutex_)
-
const TestInfo * current_test_info () const GTEST_LOCK_EXCLUDED_(mutex_)
-
int
random_seed() const
-
internal::ParameterizedTestSuiteRegistry & parameterized_test_registry () GTEST_LOCK_EXCLUDED_(mutex_)
-
int
successful_test_suite_count() const
-
int
failed_test_suite_count() const
-
int
total_test_suite_count() const
-
int
test_suite_to_run_count() const
-
int
successful_test_case_count() const
-
int
failed_test_case_count() const
-
int
total_test_case_count() const
-
int
test_case_to_run_count() const
-
int
successful_test_count() const
-
int
skipped_test_count() const
-
int
failed_test_count() const
-
int
reportable_disabled_test_count() const
-
int
disabled_test_count() const
-
int
reportable_test_count() const
-
int
total_test_count() const
-
int
test_to_run_count() const
-
TimeInMillis
start_timestamp() const
-
TimeInMillis
elapsed_time() const
-
bool
Passed() const
-
bool
Failed() const
-
const TestSuite *
GetTestSuite(int i) const
-
const TestCase *
GetTestCase(int i) const
-
const TestResult &
ad_hoc_test_result() const
-
TestEventListeners &
listeners()
Private Functions
-
Environment *
AddEnvironment(Environment *env)
-
void AddTestPartResult (TestPartResult::Type result_type, const char *file_name, int line_number, const std::string &message, const std::string &os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_)
-
void
RecordProperty(const std::string &key, const std::string &value)
-
TestSuite *
GetMutableTestSuite(int i)
-
inline internal::UnitTestImpl *
impl()
-
inline const internal::UnitTestImpl *
impl() const
-
UnitTest()
-
virtual
~UnitTest()
-
void PushGTestTrace (const internal::TraceInfo &trace) GTEST_LOCK_EXCLUDED_(mutex_)
-
void PopGTestTrace () GTEST_LOCK_EXCLUDED_(mutex_)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest)
-
Environment *
AddEnvironment(Environment *env)
-
void AddTestPartResult (TestPartResult::Type result_type, const char *file_name, int line_number, const std::string &message, const std::string &os_stack_trace) GTEST_LOCK_EXCLUDED_(mutex_)
-
void
RecordProperty(const std::string &key, const std::string &value)
-
TestSuite *
GetMutableTestSuite(int i)
-
inline internal::UnitTestImpl *
impl()
-
inline const internal::UnitTestImpl *
impl() const
-
UnitTest()
-
virtual
~UnitTest()
-
void PushGTestTrace (const internal::TraceInfo &trace) GTEST_LOCK_EXCLUDED_(mutex_)
-
void PopGTestTrace () GTEST_LOCK_EXCLUDED_(mutex_)
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(UnitTest)
Friends
- friend class ScopedTrace
- friend class Test
- friend class internal::AssertHelper
- friend class internal::StreamingListenerTest
- friend class internal::UnitTestRecordPropertyTestHelper
-
friend friend Environment * AddGlobalTestEnvironment (Environment *env)
-
friend friend std::set< std::string > * internal::GetIgnoredParameterizedTestSuites ()
-
friend friend internal::UnitTestImpl * internal::GetUnitTestImpl ()
-
friend friend void internal::ReportFailureInUnknownLocation (TestPartResult::Type result_type, const std::string &message)
-
friend friend Environment * AddGlobalTestEnvironment (Environment *env)
-
friend friend std::set< std::string > * internal::GetIgnoredParameterizedTestSuites ()
-
friend friend internal::UnitTestImpl * internal::GetUnitTestImpl ()
-
friend friend void internal::ReportFailureInUnknownLocation (TestPartResult::Type result_type, const std::string &message)
-
-
class
testing::internal::UnitTestRecordPropertyTestHelper: public testing::Test Protected Functions
-
inline
UnitTestRecordPropertyTestHelper()
-
inline void
UnitTestRecordProperty(const char *key, const std::string &value)
Protected Attributes
-
UnitTest
unit_test_
-
inline
-
template<typename
T>
classtesting::internal::UniversalPrinter - #include <gtest-printers.h>
Subclassed by testing::internal::UniversalPrinter< const T >, testing::internal::UniversalPrinter< const T >
-
template<typename
T>
classUniversalPrinter<const T> : public testing::internal::UniversalPrinter<T>, public testing::internal::UniversalPrinter<T> - #include <gtest-printers.h>
-
template<typename
T, size_tN>
classtesting::internal::UniversalPrinter<T[N]> - #include <gtest-printers.h>
-
template<typename
T>
classtesting::internal::UniversalPrinter<Wrapper<T>> Public Static Functions
-
static inline void
Print(const Wrapper<T> &w, ::std::ostream *os)
-
static inline void
-
template<>
classUniversalTersePrinter<char*> : public testing::internal::UniversalTersePrinter<const char*>, public testing::internal::UniversalTersePrinter<const char*> - #include <gtest-printers.h>
-
template<>
classUniversalTersePrinter<char16_t*> : public testing::internal::UniversalTersePrinter<const char16_t*>, public testing::internal::UniversalTersePrinter<const char16_t*> - #include <gtest-printers.h>
-
template<>
classUniversalTersePrinter<char32_t*> : public testing::internal::UniversalTersePrinter<const char32_t*>, public testing::internal::UniversalTersePrinter<const char32_t*> - #include <gtest-printers.h>
-
template<>
classtesting::internal::UniversalTersePrinter<const char*> - #include <gtest-printers.h>
Public Static Functions
-
static inline void
Print(const char *str, ::std::ostream *os)
-
static inline void
Print(const char *str, ::std::ostream *os)
-
static inline void
-
template<>
classtesting::internal::UniversalTersePrinter<const char16_t*> - #include <gtest-printers.h>
Public Static Functions
-
static inline void
Print(const char16_t *str, ::std::ostream *os)
-
static inline void
Print(const char16_t *str, ::std::ostream *os)
-
static inline void
-
template<>
classtesting::internal::UniversalTersePrinter<const char32_t*> - #include <gtest-printers.h>
Public Static Functions
-
static inline void
Print(const char32_t *str, ::std::ostream *os)
-
static inline void
Print(const char32_t *str, ::std::ostream *os)
-
static inline void
-
template<typename
T, size_tN>
classtesting::internal::UniversalTersePrinter<T[N]> - #include <gtest-printers.h>
-
template<>
classtesting::internal::UniversalTersePrinter<wchar_t*> - #include <gtest-printers.h>
Public Static Functions
-
static inline void
Print(wchar_t *str, ::std::ostream *os)
-
static inline void
Print(wchar_t *str, ::std::ostream *os)
-
static inline void
-
template<return_value_policy
policy>
classunpacking_collector - #include <cast.h>
Helper class which collects positional, keyword, * and ** arguments for a Python function call.
Public Functions
-
template<typename ...
Ts>
inline explicitunpacking_collector(Ts&&... values)
-
inline const tuple &
args() const &
-
inline const dict &
kwargs() const &
-
inline tuple
args() &&
-
inline dict
kwargs() &&
-
inline object
call(PyObject *ptr) const Call a Python function and pass the collected arguments.
-
template<typename ...
Ts>
inline explicitunpacking_collector(Ts&&... values)
-
inline const tuple &
args() const &
-
inline const dict &
kwargs() const &
-
inline tuple
args() &&
-
inline dict
kwargs() &&
-
inline object
call(PyObject *ptr) const Call a Python function and pass the collected arguments.
Private Functions
-
inline void
process(list &args_list, detail::args_proxy ap)
-
inline void
process(list&, detail::kwargs_proxy kp)
-
inline void
process(list &args_list, detail::args_proxy ap)
-
inline void
process(list&, detail::kwargs_proxy kp)
Private Static Functions
-
static inline void
nameless_argument_error()
-
static inline void
nameless_argument_error(std::string type)
-
static inline void
multiple_values_error()
-
static inline void
multiple_values_error(std::string name)
-
static inline void
argument_cast_error()
-
static inline void
argument_cast_error(std::string name, std::string type)
-
static inline void
nameless_argument_error()
-
static inline void
nameless_argument_error(std::string type)
-
static inline void
multiple_values_error()
-
static inline void
multiple_values_error(std::string name)
-
static inline void
argument_cast_error()
-
static inline void
argument_cast_error(std::string name, std::string type)
-
template<typename ...
-
class
foo::UnprintableInFoo Public Functions
-
inline
UnprintableInFoo()
-
inline double
z() const
Private Members
-
char
xy_[8]
-
double
z_
-
inline
-
template<typename
T>
classUnprintableTemplateInGlobal Public Functions
-
inline
UnprintableTemplateInGlobal()
Private Members
-
T
value_
-
inline
-
class
Unstreamable Public Functions
-
inline explicit
Unstreamable(int value)
-
inline const int &
dummy_value() const
Private Members
-
int
value_
-
inline explicit
-
template<typename
PlainObjectType, typenameStrideType>
structtype_caster<Eigen::Ref<PlainObjectType, 0, StrideType>, enable_if_t<is_eigen_dense_map<Eigen::Ref<PlainObjectType, 0, StrideType>>::value>> : public eigen_map_caster<Eigen::Ref<PlainObjectType, 0, StrideType>>, public eigen_map_caster<Eigen::Ref<PlainObjectType, 0, StrideType>> - #include <eigen.h>
Public Types
-
using
cast_op_type= pybind11::detail::cast_op_type<_T>
-
using
cast_op_type= pybind11::detail::cast_op_type<_T>
Public Functions
-
inline bool
load(handle src, bool convert)
-
inline
operator Type*()
-
inline
operator Type&()
-
inline bool
load(handle src, bool convert)
-
inline
operator Type*()
-
inline
operator Type&()
Private Types
-
using
Type= Eigen::Ref<PlainObjectType, 0, StrideType>
-
using
props= EigenProps<Type>
-
using
Scalar= typename props::Scalar
-
using
MapType= Eigen::Map<PlainObjectType, 0, StrideType>
-
Array = array_t< Scalar, array::forcecast|((props::row_major ? props::inner_stride :props::outer_stride)==1 ? array::c_style :(props::row_major ? props::outer_stride :props::inner_stride)==1 ? array::f_style :0)>
-
using
stride_ctor_default= bool_constant<S::InnerStrideAtCompileTime != Eigen::Dynamic && S::OuterStrideAtCompileTime != Eigen::Dynamic && std::is_default_constructible<S>::value>
-
using
stride_ctor_dual= bool_constant<!stride_ctor_default<S>::value && std::is_constructible<S, EigenIndex, EigenIndex>::value>
-
using
stride_ctor_outer= bool_constant<!any_of<stride_ctor_default<S>, stride_ctor_dual<S>>::value && S::OuterStrideAtCompileTime == Eigen::Dynamic && S::InnerStrideAtCompileTime != Eigen::Dynamic && std::is_constructible<S, EigenIndex>::value>
-
using
stride_ctor_inner= bool_constant<!any_of<stride_ctor_default<S>, stride_ctor_dual<S>>::value && S::InnerStrideAtCompileTime == Eigen::Dynamic && S::OuterStrideAtCompileTime != Eigen::Dynamic && std::is_constructible<S, EigenIndex>::value>
-
using
Type= Eigen::Ref<PlainObjectType, 0, StrideType>
-
using
props= EigenProps<Type>
-
using
Scalar= typename props::Scalar
-
using
MapType= Eigen::Map<PlainObjectType, 0, StrideType>
-
Array = array_t< Scalar, array::forcecast|((props::row_major ? props::inner_stride :props::outer_stride)==1 ? array::c_style :(props::row_major ? props::outer_stride :props::inner_stride)==1 ? array::f_style :0)>
-
using
stride_ctor_default= bool_constant<S::InnerStrideAtCompileTime != Eigen::Dynamic && S::OuterStrideAtCompileTime != Eigen::Dynamic && std::is_default_constructible<S>::value>
-
using
stride_ctor_dual= bool_constant<!stride_ctor_default<S>::value && std::is_constructible<S, EigenIndex, EigenIndex>::value>
-
using
stride_ctor_outer= bool_constant<!any_of<stride_ctor_default<S>, stride_ctor_dual<S>>::value && S::OuterStrideAtCompileTime == Eigen::Dynamic && S::InnerStrideAtCompileTime != Eigen::Dynamic && std::is_constructible<S, EigenIndex>::value>
-
using
stride_ctor_inner= bool_constant<!any_of<stride_ctor_default<S>, stride_ctor_dual<S>>::value && S::InnerStrideAtCompileTime == Eigen::Dynamic && S::OuterStrideAtCompileTime != Eigen::Dynamic && std::is_constructible<S, EigenIndex>::value>
Private Functions
-
template<typename
T= Type, enable_if_t<is_eigen_mutable_map<T>::value, int> = 0>
inline Scalar *data(Array &a)
-
template<typename
T= Type, enable_if_t<!is_eigen_mutable_map<T>::value, int> = 0>
inline const Scalar *data(Array &a)
-
template<typename
T= Type, enable_if_t<is_eigen_mutable_map<T>::value, int> = 0>
inline Scalar *data(Array &a)
-
template<typename
T= Type, enable_if_t<!is_eigen_mutable_map<T>::value, int> = 0>
inline const Scalar *data(Array &a)
Private Static Functions
-
template<typename
S= StrideType, enable_if_t<stride_ctor_default<S>::value, int> = 0>
static inline Smake_stride(EigenIndex, EigenIndex)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_dual<S>::value, int> = 0>
static inline Smake_stride(EigenIndex outer, EigenIndex inner)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_outer<S>::value, int> = 0>
static inline Smake_stride(EigenIndex outer, EigenIndex)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_inner<S>::value, int> = 0>
static inline Smake_stride(EigenIndex, EigenIndex inner)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_default<S>::value, int> = 0>
static inline Smake_stride(EigenIndex, EigenIndex)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_dual<S>::value, int> = 0>
static inline Smake_stride(EigenIndex outer, EigenIndex inner)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_outer<S>::value, int> = 0>
static inline Smake_stride(EigenIndex outer, EigenIndex)
-
template<typename
S= StrideType, enable_if_t<stride_ctor_inner<S>::value, int> = 0>
static inline Smake_stride(EigenIndex, EigenIndex inner)
Private Static Attributes
-
static constexpr bool
need_writeable= is_eigen_mutable_map<Type>::value
-
using
-
struct
value_and_holder - #include <cast.h>
Public Functions
-
inline
value_and_holder()
-
inline
value_and_holder(size_t index)
-
template<typename
V= void>
inline V *&value_ptr() const
-
inline explicit
operator bool() const
-
template<typename
H>
inline H &holder() const
-
inline bool
holder_constructed() const
-
inline void
set_holder_constructed(bool v = true)
-
inline bool
instance_registered() const
-
inline void
set_instance_registered(bool v = true)
-
inline
value_and_holder()
-
inline
value_and_holder(size_t index)
-
template<typename
V= void>
inline V *&value_ptr() const
-
inline explicit
operator bool() const
-
template<typename
H>
inline H &holder() const
-
inline bool
holder_constructed() const
-
inline void
set_holder_constructed(bool v = true)
-
inline bool
instance_registered() const
-
inline void
set_instance_registered(bool v = true)
-
inline
-
class
ValueParamTest: public testing::TestWithParam<int>, public testing::TestWithParam<int>, public testing::TestWithParam<MyType>
-
class
testing::DefaultValue::ValueProducer Subclassed by testing::DefaultValue< T >::FactoryValueProducer, testing::DefaultValue< T >::FactoryValueProducer, testing::DefaultValue< T >::FixedValueProducer, testing::DefaultValue< T >::FixedValueProducer
Public Functions
-
inline virtual
~ValueProducer()
-
virtual T
Produce() = 0
-
inline virtual
~ValueProducer()
-
virtual T
Produce() = 0
-
inline virtual
-
struct
values_and_holders - #include <cast.h>
Public Functions
-
inline
values_and_holders(instance *inst)
-
inline iterator
begin()
-
inline iterator
end()
-
inline size_t
size()
-
inline
values_and_holders(instance *inst)
-
inline iterator
begin()
-
inline iterator
end()
-
inline size_t
size()
Private Types
-
using
type_vec= std::vector<detail::type_info*>
-
using
type_vec= std::vector<detail::type_info*>
-
inline
-
template<typename
Variant>
structvariant_caster - #include <stl.h>
Generic variant caster.
-
template<template<typename...> class
V, typename ...Ts>
structvariant_caster<V<Ts...>> - #include <stl.h>
Public Functions
-
template<typename
U, typename ...Us>
inline boolload_alternative(handle src, bool convert, type_list<U, Us...>)
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (Type, _("Union[")+detail::concat(make_caster< Ts >::name...)+_("]"))
-
template<typename
U, typename ...Us>
inline boolload_alternative(handle src, bool convert, type_list<U, Us...>)
-
inline bool
load(handle src, bool convert)
-
PYBIND11_TYPE_CASTER (Type, _("Union[")+detail::concat(make_caster< Ts >::name...)+_("]"))
Public Static Functions
-
template<typename
Variant>
static inline handlecast(Variant &&src, return_value_policy policy, handle parent)
-
template<typename
Variant>
static inline handlecast(Variant &&src, return_value_policy policy, handle parent)
-
template<typename
-
struct
variant_caster_visitor - #include <stl.h>
Visit a variant and cast any found type to Python.
Public Functions
-
template<typename
T>
inline result_typeoperator()(T &&src) const
-
template<typename
T>
inline result_typeoperator()(T &&src) const
-
template<typename
-
template<typename
Vector, typename = void>
structvector_has_data_and_format: public false_type, public false_type - #include <stl_bind.h>
-
template<typename
Vector>
structvector_has_data_and_format<Vector, enable_if_t<std::is_same<decltype(format_descriptor<typename Vector::value_type>::format(), std::declval<Vector>().data()), typename Vector::value_type*>::value>> : public true_type, public true_type - #include <stl_bind.h>
-
template<typename
T>
structvectorize_arg - #include <numpy.h>
Public Types
-
using
call_type= remove_reference_t<T>
-
using
type= conditional_t<vectorize, array_t<remove_cv_t<call_type>, array::forcecast>, T>
-
using
call_type= remove_reference_t<T>
-
using
type= conditional_t<vectorize, array_t<remove_cv_t<call_type>, array::forcecast>, T>
Public Static Attributes
-
static constexpr bool
vectorize= satisfies_any_of<call_type, std::is_arithmetic, is_complex, std::is_pod>::value && satisfies_none_of<call_type, std::is_pointer, std::is_array, is_std_array, std::is_enum>::value && (!std::is_reference<T>::value || (std::is_lvalue_reference<T>::value && std::is_const<call_type>::value))
-
using
-
template<typename
Func, typenameReturn, typename ...Args>
structvectorize_helper - #include <numpy.h>
Public Functions
-
template<typename
T>
inline explicitvectorize_helper(T &&f)
-
inline object
operator()(typename vectorize_arg<Args>::type... args)
-
template<typename
T>
inline explicitvectorize_helper(T &&f)
-
inline object
operator()(typename vectorize_arg<Args>::type... args)
Private Types
-
using
arg_call_types= std::tuple<typename vectorize_arg<Args>::call_type...>
-
using
param_n_t= typename std::tuple_element<Index, arg_call_types>::type
-
using
arg_call_types= std::tuple<typename vectorize_arg<Args>::call_type...>
-
using
param_n_t= typename std::tuple_element<Index, arg_call_types>::type
Private Functions
-
template<size_t...
Index, size_t...VIndex, size_t...BIndex>
inline objectrun(typename vectorize_arg<Args>::type&... args, index_sequence<Index...> i_seq, index_sequence<VIndex...> vi_seq, index_sequence<BIndex...> bi_seq)
-
template<size_t...
Index, size_t...VIndex, size_t...BIndex>
inline voidapply_trivial(std::array<buffer_info, NVectorized> &buffers, std::array<void*, N> ¶ms, Return *out, size_t size, index_sequence<Index...>, index_sequence<VIndex...>, index_sequence<BIndex...>)
-
template<size_t...
Index, size_t...VIndex, size_t...BIndex>
inline voidapply_broadcast(std::array<buffer_info, NVectorized> &buffers, std::array<void*, N> ¶ms, array_t<Return> &output_array, index_sequence<Index...>, index_sequence<VIndex...>, index_sequence<BIndex...>)
-
template<size_t...
Index, size_t...VIndex, size_t...BIndex>
inline objectrun(typename vectorize_arg<Args>::type&... args, index_sequence<Index...> i_seq, index_sequence<VIndex...> vi_seq, index_sequence<BIndex...> bi_seq)
-
template<size_t...
Index, size_t...VIndex, size_t...BIndex>
inline voidapply_trivial(std::array<buffer_info, NVectorized> &buffers, std::array<void*, N> ¶ms, Return *out, size_t size, index_sequence<Index...>, index_sequence<VIndex...>, index_sequence<BIndex...>)
-
template<size_t...
Index, size_t...VIndex, size_t...BIndex>
inline voidapply_broadcast(std::array<buffer_info, NVectorized> &buffers, std::array<void*, N> ¶ms, array_t<Return> &output_array, index_sequence<Index...>, index_sequence<VIndex...>, index_sequence<BIndex...>)
Private Members
Private Static Attributes
-
static constexpr size_t
NVectorized= constexpr_sum(vectorize_arg<Args>::vectorize...)
-
template<typename
-
class
VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName
-
template<template<typename...> class
Variant>
structvisit_helper - #include <stl.h>
Helper class which abstracts away variant’s
visitfunction.std::variantand similarnamespace::varianttypes which provide anamespace::visit()function are handled here automatically using argument-dependent lookup. Users can provide specializations for other variant-like classes, e.g.boost::variantandboost::apply_visitor.
-
template<typename
T>
structvoid_caster - #include <cast.h>
Public Functions
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER (T, _("None"))
-
inline bool
load(handle src, bool)
-
PYBIND11_TYPE_CASTER (T, _("None"))
Public Static Functions
-
static inline handle
cast(T, return_value_policy, handle)
-
static inline handle
cast(T, return_value_policy, handle)
-
inline bool
-
template<typename...>
structvoid_t_impl - #include <common.h>
Public Types
-
using
type= void
-
using
type= void
-
using
-
struct
void_type - #include <common.h>
Helper type to replace ‘void’ in some expressions.
-
template<typename
InnerAction, size_t...I>
structtesting::internal::WithArgsAction - #include <gmock-actions.h>
Public Functions
-
template<typename
R, typename ...Args>
inlineoperator Action<R(Args...)>() const
-
template<typename
R, typename ...Args>
inlineoperator Action<R(Args...)>() const
Public Members
-
InnerAction
action
-
template<typename
-
template<typename
T>
classtesting::WithParamInterface - #include <gtest.h>
Subclassed by testing::TestWithParam< T >, testing::TestWithParam< T >
Public Functions
-
inline virtual
~WithParamInterface()
-
inline virtual
~WithParamInterface()
Public Static Functions
-
static inline const ParamType &
GetParam()
-
static inline const ParamType &
GetParam()
Private Static Functions
-
static inline void
SetParam(const ParamType *parameter)
-
static inline void
SetParam(const ParamType *parameter)
Private Static Attributes
-
static const ParamType *
parameter_= nullptr
Friends
- friend class internal::ParameterizedTestFactory
- friend class internal::ParameterizedTestFactory
-
inline virtual
-
struct
WrongTypeDebugStringMethod Public Functions
-
inline std::string
DebugString() const
-
inline int
ShortDebugString() const
-
inline std::string
-
class
testing::internal::XmlUnitTestResultPrinter: public testing::EmptyTestEventListener Public Functions
-
explicit
XmlUnitTestResultPrinter(const char *output_file)
-
virtual void
OnTestIterationEnd(const UnitTest &unit_test, int iteration) override
-
void
ListTestsMatchingFilter(const std::vector<TestSuite*> &test_suites)
Public Static Functions
-
static void
PrintXmlTestsList(std::ostream *stream, const std::vector<TestSuite*> &test_suites)
Private Functions
-
GTEST_DISALLOW_COPY_AND_ASSIGN_(XmlUnitTestResultPrinter)
Private Members
-
const std::string
output_file_
Private Static Functions
-
static inline bool
IsNormalizableWhitespace(char c)
-
static inline bool
IsValidXmlCharacter(char c)
-
static std::string
EscapeXml(const std::string &str, bool is_attribute)
-
static std::string
RemoveInvalidXmlCharacters(const std::string &str)
-
static inline std::string
EscapeXmlAttribute(const std::string &str)
-
static inline std::string
EscapeXmlText(const char *str)
-
static void
OutputXmlAttribute(std::ostream *stream, const std::string &element_name, const std::string &name, const std::string &value)
-
static void
OutputXmlCDataSection(::std::ostream *stream, const char *data)
-
static void
OutputXmlTestSuiteForTestResult(::std::ostream *stream, const TestResult &result)
-
static void
OutputXmlTestResult(::std::ostream *stream, const TestResult &result)
-
static void
OutputXmlTestInfo(::std::ostream *stream, const char *test_suite_name, const TestInfo &test_info)
-
static void
PrintXmlTestSuite(::std::ostream *stream, const TestSuite &test_suite)
-
static void
PrintXmlUnitTest(::std::ostream *stream, const UnitTest &unit_test)
-
static std::string
TestPropertiesAsXmlAttributes(const TestResult &result)
-
static void
OutputXmlTestProperties(std::ostream *stream, const TestResult &result)
-
explicit
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace
accessor_policies
-
namespace
bar Functions
-
TEST_F(MixedUpTestSuiteTest, ThisShouldFail)
-
TEST_F(MixedUpTestSuiteTest, ThisShouldFailToo)
-
TEST_F(MixedUpTestSuiteWithSameTestNameTest, TheSecondTestWithThisNameShouldFail)
-
-
namespace
foo Functions
-
TEST_F(MixedUpTestSuiteTest, FirstTestFromNamespaceFoo)
-
TEST_F(MixedUpTestSuiteTest, SecondTestFromNamespaceFoo)
-
TEST_F(MixedUpTestSuiteWithSameTestNameTest, TheSecondTestWithThisNameShouldFail)
-
void
PrintTo(const PrintableViaPrintTo &x, ::std::ostream *os)
-
::std::ostream &
operator<<(::std::ostream &os, const PointerPrintable*)
-
template<typename
T>
voidPrintTo(const PrintableViaPrintToTemplate<T> &x, ::std::ostream *os)
-
template<typename
T>
inline ::std::ostream &operator<<(::std::ostream &os, const StreamableTemplateInFoo<T> &x)
-
template<typename
OutputStream>
OutputStream &operator<<(OutputStream &os, const TemplatedStreamableInFoo&)
-
-
namespace
library1 Typedefs
-
typedef Types<int, long>
NumericTypes
-
typedef Types<int, long>
-
namespace
library2 Typedefs
-
typedef Types<int, double>
NumericTypes
-
typedef Types<int, double, MyPair<int, int>>
TrimTypes
Functions
-
TYPED_TEST_SUITE_P(NumericTest)
-
TYPED_TEST_P(NumericTest, DefaultIsZero)
-
TYPED_TEST_P(NumericTest, ZeroIsLessThanOne)
-
REGISTER_TYPED_TEST_SUITE_P(NumericTest, DefaultIsZero, ZeroIsLessThanOne)
-
INSTANTIATE_TYPED_TEST_SUITE_P(My, NumericTest, NumericTypes)
-
static const char *
GetTestName()
-
TYPED_TEST_SUITE_P(TrimmedTest)
-
TYPED_TEST_P(TrimmedTest, Test1)
-
TYPED_TEST_P(TrimmedTest, Test2)
-
TYPED_TEST_P(TrimmedTest, Test3)
-
TYPED_TEST_P(TrimmedTest, Test4)
-
TYPED_TEST_P(TrimmedTest, Test5)
-
REGISTER_TYPED_TEST_SUITE_P(TrimmedTest, Test1, Test2, Test3, Test4, Test5)
-
INSTANTIATE_TYPED_TEST_SUITE_P(My, TrimmedTest, TrimTypes)
-
typedef Types<int, double>
-
namespace
literals
-
namespace
my_namespace
-
namespace
my_namespace::testing Functions
-
TEST(NestedTestingNamespaceTest, Success)
-
TEST(NestedTestingNamespaceTest, Failure)
-
-
namespace
namespace1 Functions
-
std::ostream &
operator<<(std::ostream &os, const MyTypeInNameSpace1 &val)
-
std::ostream &
operator<<(std::ostream &os, const MyTypeInNameSpace1 *pointer)
-
std::ostream &
-
namespace
namespace2
-
namespace
package_template Functions
-
void
print_configuration(const Gains_configuration &configuration) print values encapsulated by the provided configuration console on the standard output
-
PID &
get_default_pid() convenience factory for getting default controller, i.e.
same as PID(std::shared_ptr<DefaultConfiguration> configuration)
-
static bool
get_parameter(const ros::NodeHandle &nh, const std::string ¶meter, double &get_value)
-
void
-
namespace
proto2
-
namespace
robot_math
-
namespace
testing -
Functions
-
template<typename
F>
Action<F>MakeAction(ActionInterface<F> *impl)
-
template<typename
Impl>
inline PolymorphicAction<Impl>MakePolymorphicAction(const Impl &impl)
-
template<typename ...
Action>
internal::DoAllAction<typename std::decay<Action>::type...>DoAll(Action&&... action)
-
template<size_t
k, typenameInnerAction>
internal::WithArgsAction<typename std::decay<InnerAction>::type, k>WithArg(InnerAction &&action)
-
template<size_t
k, size_t...ks, typenameInnerAction>
internal::WithArgsAction<typename std::decay<InnerAction>::type, k, ks...>WithArgs(InnerAction &&action)
-
template<typename
InnerAction>
internal::WithArgsAction<typename std::decay<InnerAction>::type>WithoutArgs(InnerAction &&action)
-
template<typename
R>
internal::ReturnAction<R>Return(R value)
-
inline PolymorphicAction<internal::ReturnNullAction>
ReturnNull()
-
inline PolymorphicAction<internal::ReturnVoidAction>
Return()
-
template<typename
R>
inline internal::ReturnRefAction<R>ReturnRef(R &x)
-
template<typename
R, R* = nullptr>
internal::ReturnRefAction<R>ReturnRef(R&&) = delete
-
template<typename
R>
inline internal::ReturnRefOfCopyAction<R>ReturnRefOfCopy(const R &x)
-
template<typename
R>
internal::ByMoveWrapper<R>ByMove(R x)
-
template<typename
T>
internal::ReturnRoundRobinAction<T>ReturnRoundRobin(std::vector<T> vals)
-
template<typename
T>
internal::ReturnRoundRobinAction<T>ReturnRoundRobin(std::initializer_list<T> vals)
-
inline internal::DoDefaultAction
DoDefault()
-
template<typename
T1, typenameT2>
PolymorphicAction<internal::AssignAction<T1, T2>>Assign(T1 *ptr, T2 val)
-
template<typename
T>
PolymorphicAction<internal::SetErrnoAndReturnAction<T>>SetErrnoAndReturn(int errval, T result)
-
template<typename
FunctionImpl>
std::decay<FunctionImpl>::typeInvoke(FunctionImpl &&function_impl)
-
template<class
Class, typenameMethodPtr>
internal::InvokeMethodAction<Class, MethodPtr>Invoke(Class *obj_ptr, MethodPtr method_ptr)
-
template<typename
FunctionImpl>
internal::InvokeWithoutArgsAction<typename std::decay<FunctionImpl>::type>InvokeWithoutArgs(FunctionImpl function_impl)
-
template<class
Class, typenameMethodPtr>
internal::InvokeMethodWithoutArgsAction<Class, MethodPtr>InvokeWithoutArgs(Class *obj_ptr, MethodPtr method_ptr)
-
template<typename
A>
inline internal::IgnoreResultAction<A>IgnoreResult(const A &an_action)
-
template<typename
T, typename ...Params>
internal::ReturnNewAction<T, typename std::decay<Params>::type...>ReturnNew(Params&&... params)
-
template<size_t
k>
internal::ReturnArgAction<k>ReturnArg()
-
template<size_t
k, typenameT>
internal::SetArgRefereeAction<k, typename std::decay<T>::type>SetArgReferee(T &&value)
-
template<size_t
k, typenameI1, typenameI2>
internal::SetArrayArgumentAction<k, I1, I2>SetArrayArgument(I1 first, I2 last)
-
template<size_t
k>
internal::DeleteArgAction<k>DeleteArg()
-
template<typename
Ptr>
internal::ReturnPointeeAction<Ptr>ReturnPointee(Ptr pointer)
-
template<std::size_t
index, typename ...Params>
internal::InvokeArgumentAction<index, typename std::decay<Params>::type...>InvokeArgument(Params&&... params)
-
MATCHER (IsEmpty, negation ? "isn't empty" :"is empty")
-
MATCHER (IsTrue, negation ? "is false" :"is true")
-
MATCHER (IsFalse, negation ? "is true" :"is false")
-
GMOCK_DECLARE_bool_(catch_leaked_mocks)
-
GMOCK_DECLARE_string_(verbose)
-
GMOCK_DECLARE_int32_(default_mock_behavior)
-
GTEST_API_ void InitGoogleMock (int *argc, char **argv)
-
GTEST_API_ void InitGoogleMock (int *argc, wchar_t **argv)
-
GTEST_API_ void InitGoogleMock ()
-
GTEST_DECLARE_string_(death_test_style)
-
inline std::ostream &
operator<<(std::ostream &os, const Message &sb)
-
template<typename
T, typenameIncrementT>
internal::ParamGenerator<T>Range(T start, T end, IncrementT step)
-
template<typename
ForwardIterator>
internal::ParamGenerator<typename std::iterator_traits<ForwardIterator>::value_type>ValuesIn(ForwardIterator begin, ForwardIterator end)
-
template<class
Container>
internal::ParamGenerator<typename Container::value_type>ValuesIn(const Container &container)
-
inline internal::ParamGenerator<bool>
Bool()
-
template<typename ...
Generator>
internal::CartesianProductHolder<Generator...>Combine(const Generator&... g)
-
template<typename
T>
::std::stringPrintToString(const T &value)
-
inline Environment *
AddGlobalTestEnvironment(Environment *env)
-
GTEST_API_ void InitGoogleTest (int *argc, char **argv)
-
GTEST_API_ void InitGoogleTest (int *argc, wchar_t **argv)
-
GTEST_API_ void InitGoogleTest ()
-
GTEST_API_ AssertionResult IsSubstring (const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
-
GTEST_API_ AssertionResult IsSubstring (const char *needle_expr, const char *haystack_expr, const wchar_t *needle, const wchar_t *haystack)
-
GTEST_API_ AssertionResult IsNotSubstring (const char *needle_expr, const char *haystack_expr, const char *needle, const char *haystack)
-
GTEST_API_ AssertionResult IsNotSubstring (const char *needle_expr, const char *haystack_expr, const wchar_t *needle, const wchar_t *haystack)
-
GTEST_API_ AssertionResult IsSubstring (const char *needle_expr, const char *haystack_expr, const ::std::string &needle, const ::std::string &haystack)
-
GTEST_API_ AssertionResult IsNotSubstring (const char *needle_expr, const char *haystack_expr, const ::std::string &needle, const ::std::string &haystack)
-
GTEST_API_ AssertionResult FloatLE (const char *expr1, const char *expr2, float val1, float val2)
-
GTEST_API_ AssertionResult DoubleLE (const char *expr1, const char *expr2, double val1, double val2)
-
template<typename
T1, typenameT2>
constexpr boolStaticAssertTypeEq() noexcept
-
GTEST_API_ std::string TempDir ()
-
template<int&...
ExplicitParameterBarrier, typenameFactory>
TestInfo *RegisterTest(const char *test_suite_name, const char *test_name, const char *type_param, const char *value_param, const char *file, int line, Factory factory)
-
template<typename
Pred, typenameT1>
AssertionResultAssertPred1Helper(const char *pred_text, const char *e1, Pred pred, const T1 &v1)
-
template<typename
Pred, typenameT1, typenameT2>
AssertionResultAssertPred2Helper(const char *pred_text, const char *e1, const char *e2, Pred pred, const T1 &v1, const T2 &v2)
-
template<typename
Pred, typenameT1, typenameT2, typenameT3>
AssertionResultAssertPred3Helper(const char *pred_text, const char *e1, const char *e2, const char *e3, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3)
-
template<typename
Pred, typenameT1, typenameT2, typenameT3, typenameT4>
AssertionResultAssertPred4Helper(const char *pred_text, const char *e1, const char *e2, const char *e3, const char *e4, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
-
template<typename
Pred, typenameT1, typenameT2, typenameT3, typenameT4, typenameT5>
AssertionResultAssertPred5Helper(const char *pred_text, const char *e1, const char *e2, const char *e3, const char *e4, const char *e5, Pred pred, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
-
GTEST_API_ Cardinality AtLeast (int n)
-
GTEST_API_ Cardinality AtMost (int n)
-
GTEST_API_ Cardinality AnyNumber ()
-
GTEST_API_ Cardinality Between (int min, int max)
-
GTEST_API_ Cardinality Exactly (int n)
-
GMOCK_DEFINE_bool_ (catch_leaked_mocks, true, "true if and only if Google Mock should report leaked " "mock objects as failures.")
-
GMOCK_DEFINE_string_ (verbose, internal::kWarningVerbosity, "Controls how verbose Google Mock's output is." " Valid values:\ " info - prints all messages.\" " warning - prints warnings and errors.\" " error - prints errors only.")
-
GMOCK_DEFINE_int32_ (default_mock_behavior, 1, "Controls the default behavior of mocks." " Valid values:\ " 0 - by default, mocks act as NiceMocks.\" " 1 - by default, mocks act as NaggyMocks.\" " 2 - by default, mocks act as StrictMocks.")
-
GTEST_DEFINE_string_ (death_test_style, internal::StringFromGTestEnv("death_test_style", kDefaultDeathTestStyle), "Indicates how to run a death test in a forked child process: " "\hreadsafe\(child process re-executes the test binary " "from the beginning, running only the specific death test) or " "\ast\(child process runs the death test immediately " "after forking).")
-
GTEST_DEFINE_bool_ (death_test_use_fork, internal::BoolFromGTestEnv("death_test_use_fork", false), "Instructs to use fork()/_exit() instead of clone() in death tests. " "Ignored and always uses fork() on POSIX systems where clone() is not " "implemented. Useful when running under valgrind or similar tools if " "those do not support clone(). Valgrind 3.3.1 will just fail if " "it sees an unsupported combination of clone() flags. " "It is not recommended to use this flag w/o valgrind though it will " "work in 99% of the cases. Once valgrind is fixed, this flag will " "most likely be removed.")
-
std::ostream &
operator<<(std::ostream &os, const TestPartResult &result)
-
static const char *
GetDefaultFilter()
-
static bool
GetDefaultFailFast()
-
GTEST_DEFINE_bool_ (fail_fast, internal::BoolFromGTestEnv("fail_fast", GetDefaultFailFast()), "True if and only if a test failure should stop further test execution.")
-
GTEST_DEFINE_bool_ (also_run_disabled_tests, internal::BoolFromGTestEnv("also_run_disabled_tests", false), "Run disabled tests too, in addition to the tests normally being run.")
-
GTEST_DEFINE_bool_ (break_on_failure, internal::BoolFromGTestEnv("break_on_failure", false), "True if and only if a failed assertion should be a debugger " "break-point.")
-
GTEST_DEFINE_bool_ (catch_exceptions, internal::BoolFromGTestEnv("catch_exceptions", true), "True if and only if " GTEST_NAME_ " should catch exceptions and treat them as test failures.")
-
GTEST_DEFINE_string_ (color, internal::StringFromGTestEnv("color", "auto"), "Whether to use colors in the output. Valid values: yes, no, " "and auto. 'auto' means to use colors if the output is " "being sent to a terminal and the TERM environment variable " "is set to a terminal type that supports colors.")
-
GTEST_DEFINE_string_ (filter, internal::StringFromGTestEnv("filter", GetDefaultFilter()), "A colon-separated list of glob (not regex) patterns " "for filtering the tests to run, optionally followed by a " "'-' and a : separated list of negative patterns (tests to " "exclude). A test is run if it matches one of the positive " "patterns and does not match any of the negative patterns.")
-
GTEST_DEFINE_bool_ (install_failure_signal_handler, internal::BoolFromGTestEnv("install_failure_signal_handler", false), "If true and supported on the current platform, " GTEST_NAME_ " should " "install a signal handler that dumps debugging information when fatal " "signals are raised.")
-
GTEST_DEFINE_bool_ (list_tests, false, "List all tests without running them.")
-
GTEST_DEFINE_string_ (output, internal::StringFromGTestEnv("output", internal::OutputFlagAlsoCheckEnvVar().c_str()), "A format (defaults to \ml\but can be specified to be \son\, " "optionally followed by a colon and an output file name or directory. " "A directory is indicated by a trailing pathname separator. " "Examples: \ml:filename.xml\ \ml::directoryname/\ " "If a directory is specified, output files will be created " "within that directory, with file-names based on the test " "executable's name and, if necessary, made unique by adding " "digits.")
-
GTEST_DEFINE_bool_ (brief, internal::BoolFromGTestEnv("brief", false), "True if only test failures should be displayed in text output.")
-
GTEST_DEFINE_bool_ (print_time, internal::BoolFromGTestEnv("print_time", true), "True if and only if " GTEST_NAME_ " should display elapsed time in text output.")
-
GTEST_DEFINE_bool_ (print_utf8, internal::BoolFromGTestEnv("print_utf8", true), "True if and only if " GTEST_NAME_ " prints UTF8 characters as text.")
-
GTEST_DEFINE_int32_ (random_seed, internal::Int32FromGTestEnv("random_seed", 0), "Random number seed to use when shuffling test orders. Must be in range " "[1, 99999], or 0 to use a seed based on the current time.")
-
GTEST_DEFINE_int32_ (repeat, internal::Int32FromGTestEnv("repeat", 1), "How many times to repeat each test. Specify a negative number " "for repeating forever. Useful for shaking out flaky tests.")
-
GTEST_DEFINE_bool_ (show_internal_stack_frames, false, "True if and only if " GTEST_NAME_ " should include internal stack frames when " "printing test failure stack traces.")
-
GTEST_DEFINE_bool_ (shuffle, internal::BoolFromGTestEnv("shuffle", false), "True if and only if " GTEST_NAME_ " should randomize tests' order on every run.")
-
GTEST_DEFINE_int32_ (stack_trace_depth, internal::Int32FromGTestEnv("stack_trace_depth", kMaxStackTraceDepth), "The maximum number of stack frames to print when an " "assertion fails. The valid range is 0 through 100, inclusive.")
-
GTEST_DEFINE_string_ (stream_result_to, internal::StringFromGTestEnv("stream_result_to", ""), "This flag specifies the host name and the port number on which to stream " "test results. Example: \ocalhost:555\ The flag is effective only on " "Linux.")
-
GTEST_DEFINE_bool_ (throw_on_failure, internal::BoolFromGTestEnv("throw_on_failure", false), "When this flag is specified, a failed assertion will throw an exception " "if exceptions are enabled or exit the program with a non-zero code " "otherwise. For use with an external test framework.")
-
AssertionResult
AssertionSuccess()
-
AssertionResult
AssertionFailure()
-
AssertionResult
AssertionFailure(const Message &message)
-
template<size_t
kSize>
std::vector<std::string>ArrayAsVector(const char *const (&array)[kSize])
-
static std::vector<std::string>
GetReservedAttributesForElement(const std::string &xml_element)
-
static std::vector<std::string>
GetReservedOutputAttributesForElement(const std::string &xml_element)
-
static std::string
FormatWordList(const std::vector<std::string> &words)
-
static bool
ValidateTestPropertyName(const std::string &property_name, const std::vector<std::string> &reserved_names)
-
static bool
TestPartSkipped(const TestPartResult &result)
-
static bool
TestPartFatallyFailed(const TestPartResult &result)
-
static bool
TestPartNonfatallyFailed(const TestPartResult &result)
-
static std::string
FormatCountableNoun(int count, const char *singular_form, const char *plural_form)
-
static std::string
FormatTestCount(int test_count)
-
static std::string
FormatTestSuiteCount(int test_suite_count)
-
static const char *
TestPartResultTypeToString(TestPartResult::Type type)
-
TEST(GTestEnvVarTest, Dummy)
-
void
PrintFlag(const char *flag)
-
GTEST_DECLARE_string_(filter)
-
GTEST_DECLARE_int32_(repeat)
-
TEST(SuccessfulAssertionTest, SUCCEED)
-
TEST(SuccessfulAssertionTest, EXPECT)
-
TEST(SuccessfulAssertionTest, EXPECT_STR)
-
TEST(SuccessfulAssertionTest, ASSERT)
-
TEST(SuccessfulAssertionTest, ASSERT_STR)
-
TEST_F(TestInfoTest, Names)
-
TEST_F(TestInfoTest, result)
-
TEST(CodeLocationForTEST, Verify)
-
TEST_F(CodeLocationForTESTF, Verify)
-
TEST_P(CodeLocationForTESTP, Verify)
-
INSTANTIATE_TEST_SUITE_P (, CodeLocationForTESTP, Values(0))
-
TYPED_TEST_SUITE(CodeLocationForTYPEDTEST, int)
-
TYPED_TEST(CodeLocationForTYPEDTEST, Verify)
-
TYPED_TEST_SUITE_P(CodeLocationForTYPEDTESTP)
-
TYPED_TEST_P(CodeLocationForTYPEDTESTP, Verify)
-
REGISTER_TYPED_TEST_SUITE_P(CodeLocationForTYPEDTESTP, Verify)
-
INSTANTIATE_TYPED_TEST_SUITE_P(My, CodeLocationForTYPEDTESTP, int)
-
TEST_F(SetUpTestCaseTest, Test1)
-
TEST_F(SetUpTestCaseTest, Test2)
-
TEST_F(SetUpTestSuiteTest, TestSetupTestSuite1)
-
TEST_F(SetUpTestSuiteTest, TestSetupTestSuite2)
-
TEST_F(ParseFlagsTest, Empty)
-
TEST_F(ParseFlagsTest, NoFlag)
-
TEST_F(ParseFlagsTest, FailFast)
-
TEST_F(ParseFlagsTest, FilterBad)
-
TEST_F(ParseFlagsTest, FilterEmpty)
-
TEST_F(ParseFlagsTest, FilterNonEmpty)
-
TEST_F(ParseFlagsTest, BreakOnFailureWithoutValue)
-
TEST_F(ParseFlagsTest, BreakOnFailureFalse_0)
-
TEST_F(ParseFlagsTest, BreakOnFailureFalse_f)
-
TEST_F(ParseFlagsTest, BreakOnFailureFalse_F)
-
TEST_F(ParseFlagsTest, BreakOnFailureTrue)
-
TEST_F(ParseFlagsTest, CatchExceptions)
-
TEST_F(ParseFlagsTest, DeathTestUseFork)
-
TEST_F(ParseFlagsTest, DuplicatedFlags)
-
TEST_F(ParseFlagsTest, UnrecognizedFlag)
-
TEST_F(ParseFlagsTest, ListTestsFlag)
-
TEST_F(ParseFlagsTest, ListTestsTrue)
-
TEST_F(ParseFlagsTest, ListTestsFalse)
-
TEST_F(ParseFlagsTest, ListTestsFalse_f)
-
TEST_F(ParseFlagsTest, ListTestsFalse_F)
-
TEST_F(ParseFlagsTest, OutputEmpty)
-
TEST_F(ParseFlagsTest, OutputXml)
-
TEST_F(ParseFlagsTest, OutputXmlFile)
-
TEST_F(ParseFlagsTest, OutputXmlDirectory)
-
TEST_F(ParseFlagsTest, BriefFlag)
-
TEST_F(ParseFlagsTest, BriefFlagTrue)
-
TEST_F(ParseFlagsTest, BriefFlagFalse)
-
TEST_F(ParseFlagsTest, PrintTimeFlag)
-
TEST_F(ParseFlagsTest, PrintTimeTrue)
-
TEST_F(ParseFlagsTest, PrintTimeFalse)
-
TEST_F(ParseFlagsTest, PrintTimeFalse_f)
-
TEST_F(ParseFlagsTest, PrintTimeFalse_F)
-
TEST_F(ParseFlagsTest, RandomSeed)
-
TEST_F(ParseFlagsTest, Repeat)
-
TEST_F(ParseFlagsTest, AlsoRunDisabledTestsFlag)
-
TEST_F(ParseFlagsTest, AlsoRunDisabledTestsTrue)
-
TEST_F(ParseFlagsTest, AlsoRunDisabledTestsFalse)
-
TEST_F(ParseFlagsTest, ShuffleWithoutValue)
-
TEST_F(ParseFlagsTest, ShuffleFalse_0)
-
TEST_F(ParseFlagsTest, ShuffleTrue)
-
TEST_F(ParseFlagsTest, StackTraceDepth)
-
TEST_F(ParseFlagsTest, StreamResultTo)
-
TEST_F(ParseFlagsTest, ThrowOnFailureWithoutValue)
-
TEST_F(ParseFlagsTest, ThrowOnFailureFalse_0)
-
TEST_F(ParseFlagsTest, ThrowOnFailureTrue)
-
TEST_F(CurrentTestInfoTest, WorksForFirstTestInATestSuite)
-
TEST_F(CurrentTestInfoTest, WorksForSecondTestInATestSuite)
Variables
-
class GTEST_API_ testing::ScopedTrace GTEST_ATTRIBUTE_UNUSED_
-
static const char
kDefaultDeathTestStyle[] = GTEST_DEFAULT_DEATH_TEST_STYLE
-
static const char
kDisableTestFilter[] = "DISABLED_*:*/DISABLED_*"
-
static const char
kDeathTestSuiteFilter[] = "*DeathTest:*DeathTest/*"
-
static const char
kUniversalFilter[] = "*"
-
static const char
kDefaultOutputFormat[] = "xml"
-
static const char
kDefaultOutputFile[] = "test_detail"
-
static const char
kTestShardIndex[] = "GTEST_SHARD_INDEX"
-
static const char
kTestTotalShards[] = "GTEST_TOTAL_SHARDS"
-
static const char
kTestShardStatusFile[] = "GTEST_SHARD_STATUS_FILE"
-
static const char *const
kReservedTestSuitesAttributes[] = {"disabled", "errors", "failures", "name", "random_seed", "tests", "time", "timestamp"}
-
static const char *const
kReservedTestSuiteAttributes[] = {"disabled", "errors", "failures", "name", "tests", "time", "timestamp", "skipped"}
-
static const char *const
kReservedTestCaseAttributes[] = {"classname", "name", "status", "time", "type_param", "value_param", "file", "line"}
-
static const char *const
kReservedOutputTestCaseAttributes[] = {"classname", "name", "status", "time", "type_param", "value_param", "file", "line", "result", "timestamp"}
-
template<typename
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace
testing::gmock_function_mocker_test Typedefs
-
using
FunctionMockerTestTypes= ::testing::Types<MockFoo, LegacyMockFoo>
-
using
ExpectCallTestTypes= ::testing::Types<MockB, LegacyMockB>
-
using
TemplateMockTestTypes= ::testing::Types<MockStack<int>, LegacyMockStack<int>>
-
using
OverloadedMockMethodTestTypes= ::testing::Types<MockOverloadedOnArgNumber, LegacyMockOverloadedOnArgNumber>
-
using
MockMethodMockFunctionSignatureTypes= Types<void(), int(), void(int), int(int), int(bool, int), int(bool, char, int, int, int, int, int, char, int, bool)>
Functions
-
TYPED_TEST_SUITE(FunctionMockerTest, FunctionMockerTestTypes)
-
TYPED_TEST(FunctionMockerTest, MocksVoidFunction)
-
TYPED_TEST(FunctionMockerTest, MocksNullaryFunction)
-
TYPED_TEST(FunctionMockerTest, MocksUnaryFunction)
-
TYPED_TEST(FunctionMockerTest, MocksBinaryFunction)
-
TYPED_TEST(FunctionMockerTest, MocksDecimalFunction)
-
TYPED_TEST(FunctionMockerTest, MocksFunctionWithNonConstReferenceArgument)
-
TYPED_TEST(FunctionMockerTest, MocksFunctionWithConstReferenceArgument)
-
TYPED_TEST(FunctionMockerTest, MocksFunctionWithConstArgument)
-
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentNumber)
-
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentType)
-
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis)
-
TYPED_TEST(FunctionMockerTest, MocksReturnTypeWithComma)
-
TYPED_TEST(FunctionMockerTest, MocksTypeWithTemplatedCopyCtor)
-
TEST(FunctionMockerTest, RefQualified)
-
TYPED_TEST_SUITE(ExpectCallTest, ExpectCallTestTypes)
-
TYPED_TEST(ExpectCallTest, UnmentionedFunctionCanBeCalledAnyNumberOfTimes)
-
TYPED_TEST_SUITE(TemplateMockTest, TemplateMockTestTypes)
-
TYPED_TEST(TemplateMockTest, Works)
-
TYPED_TEST(TemplateMockTest, MethodWithCommaInReturnTypeWorks)
-
TYPED_TEST_SUITE(OverloadedMockMethodTest, OverloadedMockMethodTestTypes)
-
TYPED_TEST(OverloadedMockMethodTest, CanOverloadOnArgNumberInMacroBody)
-
TEST(MockMethodOverloadedMockMethodTest, CanOverloadOnConstnessInMacroBody)
-
TEST(MockMethodMockFunctionTest, WorksForVoidNullary)
-
TEST(MockMethodMockFunctionTest, WorksForNonVoidNullary)
-
TEST(MockMethodMockFunctionTest, WorksForVoidUnary)
-
TEST(MockMethodMockFunctionTest, WorksForNonVoidBinary)
-
TEST(MockMethodMockFunctionTest, WorksFor10Arguments)
-
TEST(MockMethodMockFunctionTest, AsStdFunction)
-
TEST(MockMethodMockFunctionTest, AsStdFunctionReturnsReference)
-
TEST(MockMethodMockFunctionTest, AsStdFunctionWithReferenceParameter)
-
TYPED_TEST_SUITE(MockMethodMockFunctionSignatureTest, MockMethodMockFunctionSignatureTypes)
-
TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionTemplateArgumentDeducedForRawSignature)
-
TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionTemplateArgumentDeducedForStdFunction)
-
TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionCallMethodSignatureTheSameForRawSignatureAndStdFunction)
-
TYPED_TEST(MockMethodMockFunctionSignatureTest, IsMockFunctionAsStdFunctionMethodSignatureTheSameForRawSignatureAndStdFunction)
-
TEST(MockMethodMockFunctionTest, MockMethodSizeOverhead)
-
void
hasTwoParams(int, int)
-
void
MaybeThrows()
-
void
DoesntThrow() noexcept
-
TEST(MockMethodMockFunctionTest, NoexceptSpecifierPreserved)
-
using
-
namespace [anonymous]
-
namespace
gmock_matchers_test
-
namespace [anonymous]
-
namespace
adl_test
-
namespace
convertible_from_any
-
namespace
matcher_test
-
namespace
testing::gmock_more_actions_test Functions
-
inline short
Short(short n)
-
inline char
Char(char ch)
-
int
Nullary()
-
bool
Unary(int x)
-
bool
ByConstRef(const std::string &s)
-
bool
ReferencesGlobalDouble(const double &x)
-
const char *
Binary(const char *input, short n)
-
int
Ternary(int x, char y, short z)
-
int
SumOf4(int a, int b, int c, int d)
-
int
SumOf5(int a, int b, int c, int d, int e)
-
int
SumOf6(int a, int b, int c, int d, int e, int f)
-
std::string
Concat7(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7)
-
std::string
Concat8(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8)
-
std::string
Concat9(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9)
-
std::string
Concat10(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9, const char *s10)
-
TEST(InvokeTest, Nullary)
-
TEST(InvokeTest, Unary)
-
TEST(InvokeTest, Binary)
-
TEST(InvokeTest, Ternary)
-
TEST(InvokeTest, FunctionThatTakes4Arguments)
-
TEST(InvokeTest, FunctionThatTakes5Arguments)
-
TEST(InvokeTest, FunctionThatTakes6Arguments)
-
inline const char *
CharPtr(const char *s)
-
TEST(InvokeTest, FunctionThatTakes7Arguments)
-
TEST(InvokeTest, FunctionThatTakes8Arguments)
-
TEST(InvokeTest, FunctionThatTakes9Arguments)
-
TEST(InvokeTest, FunctionThatTakes10Arguments)
-
TEST(InvokeTest, FunctionWithUnusedParameters)
-
TEST(InvokeTest, MethodWithUnusedParameters)
-
TEST(InvokeTest, Functor)
-
TEST(InvokeTest, FunctionWithCompatibleType)
-
TEST(InvokeMethodTest, Nullary)
-
TEST(InvokeMethodTest, Unary)
-
TEST(InvokeMethodTest, Binary)
-
TEST(InvokeMethodTest, Ternary)
-
TEST(InvokeMethodTest, MethodThatTakes4Arguments)
-
TEST(InvokeMethodTest, MethodThatTakes5Arguments)
-
TEST(InvokeMethodTest, MethodThatTakes6Arguments)
-
TEST(InvokeMethodTest, MethodThatTakes7Arguments)
-
TEST(InvokeMethodTest, MethodThatTakes8Arguments)
-
TEST(InvokeMethodTest, MethodThatTakes9Arguments)
-
TEST(InvokeMethodTest, MethodThatTakes10Arguments)
-
TEST(InvokeMethodTest, MethodWithCompatibleType)
-
TEST(WithoutArgsTest, NoArg)
-
TEST(WithArgTest, OneArg)
-
TEST(ReturnArgActionTest, WorksForOneArgIntArg0)
-
TEST(ReturnArgActionTest, WorksForMultiArgBoolArg0)
-
TEST(ReturnArgActionTest, WorksForMultiArgStringArg2)
-
TEST(SaveArgActionTest, WorksForSameType)
-
TEST(SaveArgActionTest, WorksForCompatibleType)
-
TEST(SaveArgPointeeActionTest, WorksForSameType)
-
TEST(SaveArgPointeeActionTest, WorksForCompatibleType)
-
TEST(SetArgRefereeActionTest, WorksForSameType)
-
TEST(SetArgRefereeActionTest, WorksForCompatibleType)
-
TEST(SetArgRefereeActionTest, WorksWithExtraArguments)
-
TEST(DeleteArgActionTest, OneArg)
-
TEST(DeleteArgActionTest, TenArgs)
-
TEST(SetArrayArgumentTest, SetsTheNthArray)
-
TEST(SetArrayArgumentTest, SetsTheNthArrayWithEmptyRange)
-
TEST(SetArrayArgumentTest, SetsTheNthArrayWithConvertibleType)
-
TEST(SetArrayArgumentTest, SetsTheNthArrayWithIteratorArgument)
-
TEST(ReturnPointeeTest, Works)
-
TEST(InvokeArgumentTest, Function0)
-
TEST(InvokeArgumentTest, Functor1)
-
TEST(InvokeArgumentTest, Function5)
-
TEST(InvokeArgumentTest, Functor5)
-
TEST(InvokeArgumentTest, Function6)
-
TEST(InvokeArgumentTest, Functor6)
-
TEST(InvokeArgumentTest, Function7)
-
TEST(InvokeArgumentTest, Function8)
-
TEST(InvokeArgumentTest, Function9)
-
TEST(InvokeArgumentTest, Function10)
-
TEST(InvokeArgumentTest, ByPointerFunction)
-
TEST(InvokeArgumentTest, FunctionWithCStringLiteral)
-
TEST(InvokeArgumentTest, ByConstReferenceFunction)
-
TEST(InvokeArgumentTest, ByExplicitConstReferenceFunction)
-
TEST(DoAllTest, TwoActions)
-
TEST(DoAllTest, ThreeActions)
-
TEST(DoAllTest, FourActions)
-
TEST(DoAllTest, FiveActions)
-
TEST(DoAllTest, SixActions)
-
TEST(DoAllTest, SevenActions)
-
TEST(DoAllTest, EightActions)
-
TEST(DoAllTest, NineActions)
-
TEST(DoAllTest, TenActions)
-
TEST(DoAllTest, NoArgs)
-
TEST(DoAllTest, MoveOnlyArgs)
-
TEST(DoAllTest, ImplicitlyConvertsActionArguments)
-
ACTION(Return5)
-
TEST(ActionMacroTest, WorksWhenNotReferencingArguments)
-
ACTION(IncrementArg1)
-
TEST(ActionMacroTest, WorksWhenReturningVoid)
-
ACTION(IncrementArg2)
-
TEST(ActionMacroTest, CanReferenceArgumentType)
-
ACTION(Sum2)
-
TEST(ActionMacroTest, CanReferenceArgumentTuple)
-
ACTION(InvokeDummy)
-
TEST(ActionMacroTest, CanReferenceMockFunctionType)
-
ACTION(InvokeDummy2)
-
TEST(ActionMacroTest, CanReferenceMockFunctionReturnType)
-
ACTION(ReturnAddrOfConstBoolReferenceArg)
-
TEST(ActionMacroTest, WorksForConstReferenceArg)
-
ACTION(ReturnAddrOfIntReferenceArg)
-
TEST(ActionMacroTest, WorksForNonConstReferenceArg)
-
TEST(ActionMacroTest, WorksInNamespace)
-
ACTION(PlusTwo)
-
TEST(ActionMacroTest, WorksForDifferentArgumentNumbers)
-
ACTION_P(Plus, n)
-
TEST(ActionPMacroTest, DefinesParameterizedAction)
-
ACTION_P(TypedPlus, n)
-
TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes)
-
TEST(ActionPMacroTest, WorksInCompatibleMockFunction)
-
ACTION(OverloadedAction)
-
ACTION_P(OverloadedAction, default_value)
-
ACTION_P2(OverloadedAction, true_value, false_value)
-
TEST(ActionMacroTest, CanDefineOverloadedActions)
-
ACTION_P3(Plus, m, n, k)
-
TEST(ActionPnMacroTest, WorksFor3Parameters)
-
ACTION_P4(Plus, p0, p1, p2, p3)
-
TEST(ActionPnMacroTest, WorksFor4Parameters)
-
ACTION_P5(Plus, p0, p1, p2, p3, p4)
-
TEST(ActionPnMacroTest, WorksFor5Parameters)
-
ACTION_P6(Plus, p0, p1, p2, p3, p4, p5)
-
TEST(ActionPnMacroTest, WorksFor6Parameters)
-
ACTION_P7(Plus, p0, p1, p2, p3, p4, p5, p6)
-
TEST(ActionPnMacroTest, WorksFor7Parameters)
-
ACTION_P8(Plus, p0, p1, p2, p3, p4, p5, p6, p7)
-
TEST(ActionPnMacroTest, WorksFor8Parameters)
-
ACTION_P9(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
TEST(ActionPnMacroTest, WorksFor9Parameters)
-
ACTION_P10(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8, last_param)
-
TEST(ActionPnMacroTest, WorksFor10Parameters)
-
ACTION_P2(PadArgument, prefix, suffix)
-
TEST(ActionPnMacroTest, SimpleTypePromotion)
-
ACTION_P3(ConcatImpl, a, b, c)
-
template<typename
T1, typenameT2>
ConcatImplActionP3<std::string, T1, T2>Concat(const std::string &a, T1 b, T2 c)
-
TEST(ActionPnMacroTest, CanPartiallyRestrictParameterTypes)
-
ACTION(DoFoo)
-
ACTION_P(DoFoo, p)
-
ACTION_P2(DoFoo, p0, p1)
-
TEST(ActionPnMacroTest, TypesAreCorrect)
-
ACTION_P(Plus1, x)
-
ACTION_P10(Plus10, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
-
TEST(ActionPnMacroTest, CanExplicitlyInstantiateWithReferenceTypes)
-
ACTION_TEMPLATE (CreateNew, HAS_1_TEMPLATE_PARAMS(typename, T), AND_0_VALUE_PARAMS())
-
TEST(ActionTemplateTest, WorksWithoutValueParam)
-
ACTION_TEMPLATE (CreateNew, HAS_1_TEMPLATE_PARAMS(typename, T), AND_1_VALUE_PARAMS(a0))
-
TEST(ActionTemplateTest, WorksWithValueParams)
-
ACTION_TEMPLATE(MyDeleteArg, HAS_1_TEMPLATE_PARAMS(int, k), AND_0_VALUE_PARAMS())
-
TEST(ActionTemplateTest, WorksForIntegralTemplateParams)
-
ACTION_TEMPLATE (ReturnSmartPointer, HAS_1_TEMPLATE_PARAMS(template< typename Pointee > class, Pointer), AND_1_VALUE_PARAMS(pointee))
-
TEST(ActionTemplateTest, WorksForTemplateTemplateParameters)
-
ACTION_TEMPLATE (ReturnGiant, HAS_10_TEMPLATE_PARAMS(typename, T1, typename, T2, typename, T3, int, k4, bool, k5, unsigned int, k6, class, T7, class, T8, class, T9, template< typename T > class, T10), AND_1_VALUE_PARAMS(value))
-
TEST(ActionTemplateTest, WorksFor10TemplateParameters)
-
ACTION_TEMPLATE (ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_10_VALUE_PARAMS(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10))
-
TEST(ActionTemplateTest, WorksFor10ValueParameters)
-
ACTION(ReturnSum)
-
ACTION_P(ReturnSum, x)
-
ACTION_TEMPLATE (ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_2_VALUE_PARAMS(v1, v2))
-
ACTION_TEMPLATE (ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_3_VALUE_PARAMS(v1, v2, v3))
-
ACTION_TEMPLATE (ReturnSum, HAS_2_TEMPLATE_PARAMS(typename, Number, int, k), AND_4_VALUE_PARAMS(v1, v2, v3, v4))
-
TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters)
Variables
-
bool
g_done= false
-
const double
g_double= 0
-
inline short
-
namespace [anonymous]
-
namespace
testing::gmock_more_actions_test::action_test Functions
-
ACTION(Sum)
-
-
namespace
testing::gmock_nice_strict_test Functions
-
TEST(NiceMockTest, AllowsExpectedCall)
-
TEST(NiceMockTest, ThrowsExceptionForUnknownReturnTypes)
-
TEST(NiceMockTest, UnexpectedCallFails)
-
TEST(NiceMockTest, NonDefaultConstructor)
-
TEST(NiceMockTest, NonDefaultConstructor10)
-
TEST(NiceMockTest, AllowLeak)
-
TEST(NiceMockTest, MoveOnlyConstructor)
-
TEST(NiceMockTest, AcceptsClassNamedMock)
-
TEST(NiceMockTest, IsNiceInDestructor)
-
TEST(NiceMockTest, IsNaggy_IsNice_IsStrict)
-
TEST(NaggyMockTest, AllowsExpectedCall)
-
TEST(NaggyMockTest, UnexpectedCallFails)
-
TEST(NaggyMockTest, NonDefaultConstructor)
-
TEST(NaggyMockTest, NonDefaultConstructor10)
-
TEST(NaggyMockTest, AllowLeak)
-
TEST(NaggyMockTest, MoveOnlyConstructor)
-
TEST(NaggyMockTest, AcceptsClassNamedMock)
-
TEST(NaggyMockTest, IsNaggyInDestructor)
-
TEST(NaggyMockTest, IsNaggy_IsNice_IsStrict)
-
TEST(StrictMockTest, AllowsExpectedCall)
-
TEST(StrictMockTest, UnexpectedCallFails)
-
TEST(StrictMockTest, UninterestingCallFails)
-
TEST(StrictMockTest, UninterestingCallFailsAfterDeath)
-
TEST(StrictMockTest, NonDefaultConstructor)
-
TEST(StrictMockTest, NonDefaultConstructor10)
-
TEST(StrictMockTest, AllowLeak)
-
TEST(StrictMockTest, MoveOnlyConstructor)
-
TEST(StrictMockTest, AcceptsClassNamedMock)
-
TEST(StrictMockTest, IsStrictInDestructor)
-
TEST(StrictMockTest, IsNaggy_IsNice_IsStrict)
-
-
namespace
testing::gtest_printers_test Functions
-
template<typename
T>
std::stringPrint(const T &value)
-
template<typename
T>
std::stringPrintByRef(const T &value)
-
TEST(PrintEnumTest, AnonymousEnum)
-
TEST(PrintEnumTest, EnumWithoutPrinter)
-
TEST(PrintEnumTest, EnumWithStreaming)
-
TEST(PrintEnumTest, EnumWithPrintTo)
-
TEST(PrintClassTest, BiggestIntConvertible)
-
TEST(PrintCharTest, PlainChar)
-
TEST(PrintCharTest, SignedChar)
-
TEST(PrintCharTest, UnsignedChar)
-
TEST(PrintCharTest, Char16)
-
TEST(PrintCharTest, Char32)
-
TEST(PrintBuiltInTypeTest, Bool)
-
TEST(PrintBuiltInTypeTest, Wchar_t)
-
TEST(PrintTypeSizeTest, Wchar_t)
-
TEST(PrintBuiltInTypeTest, Integer)
-
TEST(PrintBuiltInTypeTest, Size_t)
-
TEST(PrintBuiltInTypeTest, FloatingPoints)
-
static std::string
PrintPointer(const void *p)
-
TEST(PrintCStringTest, Const)
-
TEST(PrintCStringTest, NonConst)
-
TEST(PrintCStringTest, Null)
-
TEST(PrintCStringTest, EscapesProperly)
-
TEST(PrintU16StringTest, Const)
-
TEST(PrintU16StringTest, NonConst)
-
TEST(PrintU16StringTest, Null)
-
TEST(PrintU16StringTest, EscapesProperly)
-
TEST(PrintU32StringTest, Const)
-
TEST(PrintU32StringTest, NonConst)
-
TEST(PrintU32StringTest, Null)
-
TEST(PrintU32StringTest, EscapesProperly)
-
TEST(PrintWideCStringTest, Const)
-
TEST(PrintWideCStringTest, NonConst)
-
TEST(PrintWideCStringTest, Null)
-
TEST(PrintWideCStringTest, EscapesProperly)
-
TEST(PrintCharPointerTest, SignedChar)
-
TEST(PrintCharPointerTest, ConstSignedChar)
-
TEST(PrintCharPointerTest, UnsignedChar)
-
TEST(PrintCharPointerTest, ConstUnsignedChar)
-
TEST(PrintPointerToBuiltInTypeTest, Bool)
-
TEST(PrintPointerToBuiltInTypeTest, Void)
-
TEST(PrintPointerToBuiltInTypeTest, ConstVoid)
-
TEST(PrintPointerToPointerTest, IntPointerPointer)
-
void
MyFunction(int)
-
TEST(PrintPointerTest, NonMemberFunctionPointer)
-
template<typename
StringType>
AssertionResultHasPrefix(const StringType &str, const StringType &prefix)
-
TEST(PrintPointerTest, MemberVariablePointer)
-
TEST(PrintPointerTest, MemberFunctionPointer)
-
TEST(PrintArrayTest, OneDimensionalArray)
-
TEST(PrintArrayTest, TwoDimensionalArray)
-
TEST(PrintArrayTest, ConstArray)
-
TEST(PrintArrayTest, CharArrayWithNoTerminatingNul)
-
TEST(PrintArrayTest, CharArrayWithTerminatingNul)
-
TEST(PrintArrayTest, Char16ArrayWithNoTerminatingNul)
-
TEST(PrintArrayTest, Char16ArrayWithTerminatingNul)
-
TEST(PrintArrayTest, Char32ArrayWithNoTerminatingNul)
-
TEST(PrintArrayTest, Char32ArrayWithTerminatingNul)
-
TEST(PrintArrayTest, WCharArrayWithNoTerminatingNul)
-
TEST(PrintArrayTest, WCharArrayWithTerminatingNul)
-
TEST(PrintArrayTest, ObjectArray)
-
TEST(PrintArrayTest, BigArray)
-
TEST(PrintStringTest, StringInStdNamespace)
-
TEST(PrintStringTest, StringAmbiguousHex)
-
TEST(PrintStringTest, U16String)
-
TEST(PrintStringTest, U32String)
-
template<typename
Char, typenameCharTraits>
std::basic_ostream<Char, CharTraits> &operator<<(std::basic_ostream<Char, CharTraits> &os, const AllowsGenericStreaming&)
-
TEST(PrintTypeWithGenericStreamingTest, NonTemplateType)
-
template<typename
Char, typenameCharTraits, typenameT>
std::basic_ostream<Char, CharTraits> &operator<<(std::basic_ostream<Char, CharTraits> &os, const AllowsGenericStreamingTemplate<T>&)
-
TEST(PrintTypeWithGenericStreamingTest, TemplateType)
-
template<typename
Char, typenameCharTraits, typenameT>
std::basic_ostream<Char, CharTraits> &operator<<(std::basic_ostream<Char, CharTraits> &os, const AllowsGenericStreamingAndImplicitConversionTemplate<T>&)
-
TEST(PrintTypeWithGenericStreamingTest, TypeImplicitlyConvertible)
-
TEST(PrintStlContainerTest, EmptyDeque)
-
TEST(PrintStlContainerTest, NonEmptyDeque)
-
TEST(PrintStlContainerTest, OneElementHashMap)
-
TEST(PrintStlContainerTest, HashMultiMap)
-
TEST(PrintStlContainerTest, HashSet)
-
TEST(PrintStlContainerTest, HashMultiSet)
-
TEST(PrintStlContainerTest, List)
-
TEST(PrintStlContainerTest, Map)
-
TEST(PrintStlContainerTest, MultiMap)
-
TEST(PrintStlContainerTest, Set)
-
TEST(PrintStlContainerTest, MultiSet)
-
TEST(PrintStlContainerTest, SinglyLinkedList)
-
TEST(PrintStlContainerTest, Pair)
-
TEST(PrintStlContainerTest, Vector)
-
TEST(PrintStlContainerTest, LongSequence)
-
TEST(PrintStlContainerTest, NestedContainer)
-
TEST(PrintStlContainerTest, OneDimensionalNativeArray)
-
TEST(PrintStlContainerTest, TwoDimensionalNativeArray)
-
TEST(PrintStlContainerTest, Iterator)
-
TEST(PrintStlContainerTest, ConstIterator)
-
TEST(PrintStdTupleTest, VariousSizes)
-
TEST(PrintStdTupleTest, NestedTuple)
-
TEST(PrintNullptrT, Basic)
-
TEST(PrintReferenceWrapper, Printable)
-
TEST(PrintReferenceWrapper, Unprintable)
-
TEST(PrintUnprintableTypeTest, InGlobalNamespace)
-
TEST(PrintUnprintableTypeTest, InUserNamespace)
-
TEST(PrintUnpritableTypeTest, BigObject)
-
TEST(PrintStreamableTypeTest, InGlobalNamespace)
-
TEST(PrintStreamableTypeTest, TemplateTypeInUserNamespace)
-
TEST(PrintStreamableTypeTest, TypeInUserNamespaceWithTemplatedStreamOperator)
-
TEST(PrintStreamableTypeTest, SubclassUsesSuperclassStreamOperator)
-
TEST(PrintStreamableTypeTest, PathLikeInUserNamespace)
-
TEST(PrintPrintableTypeTest, InUserNamespace)
-
TEST(PrintPrintableTypeTest, PointerInUserNamespace)
-
TEST(PrintPrintableTypeTest, TemplateInUserNamespace)
-
TEST(PrintReferenceTest, PrintsAddressAndValue)
-
TEST(PrintReferenceTest, HandlesFunctionPointer)
-
TEST(PrintReferenceTest, HandlesMemberFunctionPointer)
-
TEST(PrintReferenceTest, HandlesMemberVariablePointer)
-
TEST(FormatForComparisonFailureMessageTest, WorksForScalar)
-
TEST(FormatForComparisonFailureMessageTest, WorksForNonCharPointer)
-
TEST(FormatForComparisonFailureMessageTest, FormatsNonCharArrayAsPointer)
-
TEST(FormatForComparisonFailureMessageTest, WorksForCharPointerVsPointer)
-
TEST(FormatForComparisonFailureMessageTest, WorksForWCharPointerVsPointer)
-
TEST(FormatForComparisonFailureMessageTest, WorksForCharPointerVsStdString)
-
TEST(FormatForComparisonFailureMessageTest, WorksForCharArrayVsPointer)
-
TEST(FormatForComparisonFailureMessageTest, WorksForCharArrayVsCharArray)
-
TEST(FormatForComparisonFailureMessageTest, WorksForWCharArrayVsPointer)
-
TEST(FormatForComparisonFailureMessageTest, WorksForWCharArrayVsWCharArray)
-
TEST(FormatForComparisonFailureMessageTest, WorksForCharArrayVsStdString)
-
TEST(PrintToStringTest, WorksForScalar)
-
TEST(PrintToStringTest, WorksForPointerToConstChar)
-
TEST(PrintToStringTest, WorksForPointerToNonConstChar)
-
TEST(PrintToStringTest, EscapesForPointerToConstChar)
-
TEST(PrintToStringTest, EscapesForPointerToNonConstChar)
-
TEST(PrintToStringTest, WorksForArray)
-
TEST(PrintToStringTest, WorksForCharArray)
-
TEST(PrintToStringTest, WorksForCharArrayWithEmbeddedNul)
-
TEST(PrintToStringTest, ContainsNonLatin)
-
TEST(IsValidUTF8Test, IllFormedUTF8)
-
TEST(UniversalTersePrintTest, WorksForNonReference)
-
TEST(UniversalTersePrintTest, WorksForReference)
-
TEST(UniversalTersePrintTest, WorksForCString)
-
TEST(UniversalPrintTest, WorksForNonReference)
-
TEST(UniversalPrintTest, WorksForReference)
-
TEST(UniversalPrintTest, WorksForPairWithConst)
-
TEST(UniversalPrintTest, WorksForCString)
-
TEST(UniversalPrintTest, WorksForCharArray)
-
TEST(UniversalPrintTest, IncompleteType)
-
TEST(UniversalPrintTest, SmartPointers)
-
TEST(UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsEmptyTuple)
-
TEST(UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsOneTuple)
-
TEST(UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsTwoTuple)
-
TEST(UniversalTersePrintTupleFieldsToStringsTestWithStd, PrintsTersely)
-
template<typename
-
namespace [anonymous]
-
namespace
testing::internal Typedefs
-
using
disjunction= typename ::std::conditional<P::value, P, Q>::type
-
using
identity_t= T
-
typedef ::std::vector<::std::string>
Strings
Enums
-
enum
CharFormat Values:
-
enumerator
kAsIs
-
enumerator
kHexEscape
-
enumerator
kSpecialEscape
-
enumerator
Functions
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (void,)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (::std::string, "")
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (bool, false)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned char, '\0')
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed char, '\0')
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (char, '\0')
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned short, 0U)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed short, 0)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned long, 0UL)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed long, 0L)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (unsigned long long, 0)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (signed long long, 0)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (float, 0)
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ (double, 0)
-
template<typename
F, typename ...Args>
autoInvokeArgument(F f, Args... args) -> decltype(f(args...))
-
template<typename
T>
std::true_typeStrictnessModifierProbe(const StrictMock<T>&)
-
std::false_type
StrictnessModifierProbe(...)
-
template<typename
T>
constexpr boolHasStrictnessModifier()
-
template<typename
T>
std::stringStreamableToString(const T &streamable)
-
template<typename
T>
voidUniversalPrint(const T &value, ::std::ostream *os)
-
GTEST_API_ void PrintBytesInObjectTo (const unsigned char *obj_bytes, size_t count, ::std::ostream *os)
-
template<typename
T>
voidPrintWithFallback(const T &value, ::std::ostream *os)
-
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char)
-
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(wchar_t)
-
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char16_t)
-
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(char32_t)
-
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char, ::std::string)
-
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char16_t, ::std::u16string)
-
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(char32_t, ::std::u32string)
-
template<typename
T1, typenameT2>
std::stringFormatForComparisonFailureMessage(const T1 &value, const T2&)
-
template<typename
T>
voidPrintTo(const T &value, ::std::ostream *os)
-
GTEST_API_ void PrintTo (unsigned char c, ::std::ostream *os)
-
GTEST_API_ void PrintTo (signed char c, ::std::ostream *os)
-
inline void
PrintTo(char c, ::std::ostream *os)
-
inline void
PrintTo(bool x, ::std::ostream *os)
-
GTEST_API_ void PrintTo (wchar_t wc, ::std::ostream *os)
-
GTEST_API_ void PrintTo (char32_t c, ::std::ostream *os)
-
inline void
PrintTo(char16_t c, ::std::ostream *os)
-
GTEST_API_ void PrintTo (const char *s, ::std::ostream *os)
-
inline void
PrintTo(char *s, ::std::ostream *os)
-
inline void
PrintTo(const signed char *s, ::std::ostream *os)
-
inline void
PrintTo(signed char *s, ::std::ostream *os)
-
inline void
PrintTo(const unsigned char *s, ::std::ostream *os)
-
inline void
PrintTo(unsigned char *s, ::std::ostream *os)
-
void
PrintTo(const char16_t *s, ::std::ostream *os)
-
inline void
PrintTo(char16_t *s, ::std::ostream *os)
-
void
PrintTo(const char32_t *s, ::std::ostream *os)
-
inline void
PrintTo(char32_t *s, ::std::ostream *os)
-
GTEST_API_ void PrintTo (const wchar_t *s, ::std::ostream *os)
-
inline void
PrintTo(wchar_t *s, ::std::ostream *os)
-
GTEST_API_ void PrintStringTo (const ::std::string &s, ::std::ostream *os)
-
inline void
PrintTo(const ::std::string &s, ::std::ostream *os)
-
GTEST_API_ void PrintU16StringTo (const ::std::u16string &s, ::std::ostream *os)
-
inline void
PrintTo(const ::std::u16string &s, ::std::ostream *os)
-
GTEST_API_ void PrintU32StringTo (const ::std::u32string &s, ::std::ostream *os)
-
inline void
PrintTo(const ::std::u32string &s, ::std::ostream *os)
-
inline void
PrintTo(std::nullptr_t, ::std::ostream *os)
-
template<typename
T>
voidPrintTo(std::reference_wrapper<T> ref, ::std::ostream *os)
-
inline const void *
VoidifyPointer(const void *p)
-
inline const void *
VoidifyPointer(volatile const void *p)
-
template<typename
T, typenamePtr>
voidPrintSmartPointer(const Ptr &ptr, std::ostream *os, char)
-
template<typename
T, typenamePtr, typename = typename std::enable_if<!std::is_void<T>::value && !std::is_array<T>::value>::type>
voidPrintSmartPointer(const Ptr &ptr, std::ostream *os, int)
-
template<typename
T, size_tI>
voidPrintTupleTo(const T &t, std::integral_constant<size_t, I>, ::std::ostream *os)
-
template<typename ...
Types>
voidPrintTo(const ::std::tuple<Types...> &t, ::std::ostream *os)
-
template<typename
T1, typenameT2>
voidPrintTo(const ::std::pair<T1, T2> &value, ::std::ostream *os)
-
GTEST_API_ void UniversalPrintArray (const char *begin, size_t len, ::std::ostream *os)
-
GTEST_API_ void UniversalPrintArray (const char16_t *begin, size_t len, ::std::ostream *os)
-
GTEST_API_ void UniversalPrintArray (const char32_t *begin, size_t len, ::std::ostream *os)
-
GTEST_API_ void UniversalPrintArray (const wchar_t *begin, size_t len, ::std::ostream *os)
-
template<typename
T>
voidUniversalTersePrint(const T &value, ::std::ostream *os)
-
template<typename
Tuple>
voidTersePrintPrefixToStrings(const Tuple&, std::integral_constant<size_t, 0>, Strings*)
-
template<typename
Tuple, size_tI>
voidTersePrintPrefixToStrings(const Tuple &t, std::integral_constant<size_t, I>, Strings *strings)
-
template<typename
T1, typenameT2>
AssertionResultCmpHelperEQFailure(const char *lhs_expression, const char *rhs_expression, const T1 &lhs, const T2 &rhs)
-
template<typename
T1, typenameT2>
AssertionResultCmpHelperEQ(const char *lhs_expression, const char *rhs_expression, const T1 &lhs, const T2 &rhs)
-
template<typename
T1, typenameT2>
AssertionResultCmpHelperOpFailure(const char *expr1, const char *expr2, const T1 &val1, const T2 &val2, const char *op)
-
GTEST_API_ AssertionResult CmpHelperSTREQ (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
-
GTEST_API_ AssertionResult CmpHelperSTRCASEEQ (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
-
GTEST_API_ AssertionResult CmpHelperSTRNE (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
-
GTEST_API_ AssertionResult CmpHelperSTRCASENE (const char *s1_expression, const char *s2_expression, const char *s1, const char *s2)
-
GTEST_API_ AssertionResult CmpHelperSTREQ (const char *s1_expression, const char *s2_expression, const wchar_t *s1, const wchar_t *s2)
-
GTEST_API_ AssertionResult CmpHelperSTRNE (const char *s1_expression, const char *s2_expression, const wchar_t *s1, const wchar_t *s2)
-
template<typename
RawType>
AssertionResultCmpHelperFloatingPointEQ(const char *lhs_expression, const char *rhs_expression, RawType lhs_value, RawType rhs_value)
-
GTEST_API_ AssertionResult DoubleNearPredFormat (const char *expr1, const char *expr2, const char *abs_error_expr, double val1, double val2, double abs_error)
-
GTEST_API_ std::string JoinAsTuple (const Strings &fields)
-
GTEST_API_ std::string ConvertIdentifierNameToWords (const char *id_name)
-
GTEST_API_ FailureReporterInterface * GetFailureReporter ()
-
static static GTEST_DEFINE_STATIC_MUTEX_ (g_log_mutex)
-
GTEST_API_ bool LogIsVisible (LogSeverity severity)
-
GTEST_API_ void Log (LogSeverity severity, const std::string &message, int stack_frames_to_skip)
-
GTEST_API_ WithoutMatchers GetWithoutMatchers ()
-
GTEST_API_ void IllegalDoDefault (const char *file, int line)
-
GTEST_API_ std::string FormatMatcherDescription (bool negation, const char *matcher_name, const Strings ¶m_values)
-
GTEST_API_ ElementMatcherPairs FindMaxBipartiteMatching (const MatchMatrix &g)
-
static void
LogElementMatcherPairVec(const ElementMatcherPairs &pairs, ::std::ostream *stream)
-
GTEST_API_
GTEST_DEFINE_STATIC_MUTEX_(g_gmock_mutex)
-
GTEST_API_ void LogWithLocation (testing::internal::LogSeverity severity, const char *file, int line, const std::string &message)
-
void
ReportUninterestingCall(CallReaction reaction, const std::string &msg)
-
CallReaction
intToCallReaction(int mock_behavior)
-
static const char *
ParseGoogleMockFlagValue(const char *str, const char *flag, bool def_optional)
-
static bool
ParseGoogleMockBoolFlag(const char *str, const char *flag, bool *value)
-
template<typename
String>
static boolParseGoogleMockStringFlag(const char *str, const char *flag, String *value)
-
static bool
ParseGoogleMockIntFlag(const char *str, const char *flag, int32_t *value)
-
template<typename
CharType>
voidInitGoogleMockImpl(int *argc, CharType **argv)
-
GTEST_DEFINE_string_ (internal_run_death_test, "", "Indicates the file, line number, temporal index of " "the single death test to run, and a file descriptor to " "which a success code may be sent, all separated by " "the '|' characters. This flag is specified if and only if the " "current process is a sub-process launched for running a thread-safe " "death test. FOR INTERNAL USE ONLY.")
-
static bool
IsPathSeparator(char c)
-
size_t
GetThreadCount()
-
GTEST_API_::std::string
FormatFileLocation(const char *file, int line)
-
GTEST_API_::std::string
FormatCompilerIndependentFileLocation(const char *file, int line)
-
size_t
GetFileSize(FILE *file)
-
std::string
ReadEntireFile(FILE *file)
-
static std::string
FlagToEnvVar(const char *flag)
-
bool
ParseInt32(const Message &src_text, const char *str, int32_t *value)
-
bool
BoolFromGTestEnv(const char *flag, bool default_value)
-
int32_t
Int32FromGTestEnv(const char *flag, int32_t default_value)
-
std::string
OutputFlagAlsoCheckEnvVar()
-
const char *
StringFromGTestEnv(const char *flag, const char *default_value)
-
void
PrintBytesInObjectTo(const unsigned char *obj_bytes, size_t count, ostream *os)
-
inline bool
IsPrintableAscii(char32_t c)
-
template<typename
Char>
static CharFormatPrintAsCharLiteralTo(Char c, ostream *os)
-
static CharFormat
PrintAsStringLiteralTo(char32_t c, ostream *os)
-
static const char *
GetCharWidthPrefix(char)
-
static const char *
GetCharWidthPrefix(signed char)
-
static const char *
GetCharWidthPrefix(unsigned char)
-
static const char *
GetCharWidthPrefix(char16_t)
-
static const char *
GetCharWidthPrefix(char32_t)
-
static const char *
GetCharWidthPrefix(wchar_t)
-
static CharFormat
PrintAsStringLiteralTo(char c, ostream *os)
-
static CharFormat
PrintAsStringLiteralTo(char16_t c, ostream *os)
-
static CharFormat
PrintAsStringLiteralTo(wchar_t c, ostream *os)
-
template<typename
Char>
voidPrintCharAndCodeTo(Char c, ostream *os)
-
void
PrintTo(wchar_t wc, ostream *os)
-
template<typename CharType> static GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ CharFormat PrintCharsAsStringTo (const CharType *begin, size_t len, ostream *os)
-
template<typename CharType> static GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static GTEST_ATTRIBUTE_NO_SANITIZE_THREAD_ void UniversalPrintCharArray (const CharType *begin, size_t len, ostream *os)
-
void
UniversalPrintArray(const char *begin, size_t len, ostream *os)
-
void
UniversalPrintArray(const char16_t *begin, size_t len, ostream *os)
-
void
UniversalPrintArray(const char32_t *begin, size_t len, ostream *os)
-
void
UniversalPrintArray(const wchar_t *begin, size_t len, ostream *os)
-
void
PrintTo(const char *s, ostream *os)
-
void
PrintTo(const char16_t *s, ostream *os)
-
void
PrintTo(const char32_t *s, ostream *os)
-
void
PrintTo(const wchar_t *s, ostream *os)
-
void
PrintStringTo(const ::std::string &s, ostream *os)
-
void
PrintU16StringTo(const ::std::u16string &s, ostream *os)
-
void
PrintU32StringTo(const ::std::u32string &s, ostream *os)
-
static const char *
SkipSpaces(const char *str)
-
static std::vector<std::string>
SplitIntoTestNames(const char *src)
-
static FILE *
OpenFileForWriting(const std::string &output_file)
-
static bool
GTestIsInitialized()
-
static int
SumOverTestSuiteList(const std::vector<TestSuite*> &case_list, int (TestSuite::* method)() const)
-
static bool
TestSuitePassed(const TestSuite *test_suite)
-
static bool
TestSuiteFailed(const TestSuite *test_suite)
-
static bool
ShouldRunTestSuite(const TestSuite *test_suite)
-
std::set<std::string> *
GetIgnoredParameterizedTestSuites()
-
void
InsertSyntheticTestCase(const std::string &name, CodeLocation location, bool has_test_p)
-
void
RegisterTypeParameterizedTestSuite(const char *test_suite_name, CodeLocation code_location)
-
void
RegisterTypeParameterizedTestSuiteInstantiation(const char *case_name)
-
::std::vector<std::string>
GetArgvs()
-
FilePath
GetCurrentExecutableName()
-
static bool
PatternMatchesString(const std::string &name_str, const char *pattern, const char *pattern_end)
-
TypeId
GetTestTypeId()
-
static AssertionResult
HasOneFailure(const char*, const char*, const char*, const TestPartResultArray &results, TestPartResult::Type type, const std::string &substr)
-
TimeInMillis
GetTimeInMillis()
-
void
SplitString(const ::std::string &str, char delimiter, ::std::vector<::std::string> *dest)
-
AssertionResult
EqFailure(const char *lhs_expression, const char *rhs_expression, const std::string &lhs_value, const std::string &rhs_value, bool ignoring_case)
-
std::string
GetBoolAssertionFailureMessage(const AssertionResult &assertion_result, const char *expression_text, const char *actual_predicate_value, const char *expected_predicate_value)
-
template<typename
RawType>
AssertionResultFloatingPointLE(const char *expr1, const char *expr2, RawType val1, RawType val2)
-
inline uint32_t
ChopLowBits(uint32_t *bits, int n)
-
std::string
CodePointToUtf8(uint32_t code_point)
-
inline bool
IsUtf16SurrogatePair(wchar_t first, wchar_t second)
-
inline uint32_t
CreateCodePointFromUtf16SurrogatePair(wchar_t first, wchar_t second)
-
std::string
WideStringToUtf8(const wchar_t *str, int num_chars)
-
std::string
StringStreamToString(::std::stringstream *ss)
-
std::string
AppendUserMessage(const std::string >est_msg, const Message &user_msg)
-
void
ReportFailureInUnknownLocation(TestPartResult::Type result_type, const std::string &message)
-
template<class
T, typenameResult>
ResultHandleSehExceptionsInMethodIfSupported(T *object, Result (T::* method)()const char *location, )
-
template<class
T, typenameResult>
ResultHandleExceptionsInMethodIfSupported(T *object, Result (T::* method)()const char *location, )
-
TestInfo *
MakeAndRegisterTestInfo(const char *test_suite_name, const char *name, const char *type_param, const char *value_param, CodeLocation code_location, TypeId fixture_class_id, SetUpTestSuiteFunc set_up_tc, TearDownTestSuiteFunc tear_down_tc, TestFactoryBase *factory)
-
void
ReportInvalidTestSuiteType(const char *test_suite_name, CodeLocation code_location)
-
static std::string
PrintTestPartResultToString(const TestPartResult &test_part_result)
-
static void
PrintTestPartResult(const TestPartResult &test_part_result)
-
static const char *
GetAnsiColorCode(GTestColor color)
-
bool
ShouldUseColor(bool stdout_is_tty)
-
static void
ColoredPrintf(GTestColor color, const char *fmt, ...)
-
static void
PrintFullTestCommentIfPresent(const TestInfo &test_info)
-
std::string
FormatTimeInMillisAsSeconds(TimeInMillis ms)
-
static bool
PortableLocaltime(time_t seconds, struct tm *out)
-
std::string
FormatEpochTimeInMillisAsIso8601(TimeInMillis ms)
-
static std::string
FormatTimeInMillisAsDuration(TimeInMillis ms)
-
static std::string
FormatEpochTimeInMillisAsRFC3339(TimeInMillis ms)
-
static inline std::string
Indent(size_t width)
-
static void
SetUpEnvironment(Environment *env)
-
static void
TearDownEnvironment(Environment *env)
-
void
WriteToShardStatusFileIfNeeded()
-
bool
ShouldShard(const char *total_shards_env, const char *shard_index_env, bool in_subprocess_for_death_test)
-
int32_t
Int32FromEnvOrDie(const char *var, int32_t default_val)
-
bool
ShouldRunTestOnShard(int total_shards, int shard_index, int test_id)
-
static void
PrintOnOneLine(const char *str, int max_length)
-
std::string
GetCurrentOsStackTraceExceptTop(UnitTest*, int skip_count)
-
bool
IsTrue(bool condition)
-
bool
AlwaysTrue()
-
bool
SkipPrefix(const char *prefix, const char **pstr)
-
static const char *
ParseFlagValue(const char *str, const char *flag, bool def_optional)
-
static bool
ParseBoolFlag(const char *str, const char *flag, bool *value)
-
bool
ParseInt32Flag(const char *str, const char *flag, int32_t *value)
-
template<typename
String>
static boolParseStringFlag(const char *str, const char *flag, String *value)
-
static bool
HasGoogleTestFlagPrefix(const char *str)
-
static void
PrintColorEncoded(const char *str)
-
static bool
ParseGoogleTestFlag(const char *const arg)
-
template<typename
CharType>
voidParseGoogleTestFlagsOnlyImpl(int *argc, CharType **argv)
-
void
ParseGoogleTestFlagsOnly(int *argc, char **argv)
-
void
ParseGoogleTestFlagsOnly(int *argc, wchar_t **argv)
-
template<typename
CharType>
voidInitGoogleTestImpl(int *argc, CharType **argv)
-
TEST_F(ListenerTest, DoesFoo)
-
TEST_F(ListenerTest, DoesBar)
-
TEST(IsXDigitTest, WorksForNarrowAscii)
-
TEST(IsXDigitTest, ReturnsFalseForNarrowNonAscii)
-
TEST(IsXDigitTest, WorksForWideAscii)
-
TEST(IsXDigitTest, ReturnsFalseForWideNonAscii)
-
TEST(ImplicitCastTest, ConvertsPointers)
-
TEST(ImplicitCastTest, CanUseInheritance)
-
TEST(ImplicitCastTest, CanUseNonConstCastOperator)
-
TEST(ImplicitCastTest, CanUseConstCastOperatorOnConstValues)
-
TEST(ImplicitCastTest, CanSelectBetweenConstAndNonConstCasrAppropriately)
-
TEST(ImplicitCastTest, CanUseImplicitConstructor)
-
TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement)
-
TEST(GtestCheckSyntaxTest, WorksWithSwitch)
-
TEST(FormatFileLocationTest, FormatsFileLocation)
-
TEST(FormatFileLocationTest, FormatsUnknownFile)
-
TEST(FormatFileLocationTest, FormatsUknownLine)
-
TEST(FormatFileLocationTest, FormatsUknownFileAndLine)
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsFileLocation)
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFile)
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownLine)
-
TEST(FormatCompilerIndependentFileLocationTest, FormatsUknownFileAndLine)
-
TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads)
-
TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure)
-
TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine)
-
TEST(CaptureTest, CapturesStdout)
-
TEST(CaptureTest, CapturesStderr)
-
TEST(CaptureTest, CapturesStdoutAndStderr)
-
TEST(CaptureDeathTest, CannotReenterStdoutCapture)
-
TEST(ThreadLocalTest, DefaultConstructorInitializesToDefaultValues)
-
TEST(ThreadLocalTest, SingleParamConstructorInitializesToParam)
-
TEST(ThreadLocalTest, ValueDefaultContructorIsNotRequiredForParamVersion)
-
TEST(ThreadLocalTest, GetAndPointerReturnSameValue)
-
TEST(ThreadLocalTest, PointerAndConstPointerReturnSameValue)
-
TYPED_TEST_SUITE(TestSuiteWithCommentTest, Types<int>)
-
TYPED_TEST(TestSuiteWithCommentTest, Dummy)
-
TEST(ApiTest, UnitTestImmutableAccessorsWork)
-
AssertionResult
IsNull(const char *str)
-
TEST(ApiTest, TestSuiteImmutableAccessorsWork)
-
TEST(ApiTest, TestSuiteDisabledAccessorsWork)
-
TEST(ApiTest, DISABLED_Dummy1)
-
TEST(DISABLED_Test, Dummy2)
Variables
-
GTEST_API_ ThreadLocal< Sequence * > g_gmock_implicit_sequence
-
const char
kPathSeparator= '/'
-
const char
kCurrentDirectoryString[] = "./"
-
const int
kStdOutFileno= STDOUT_FILENO
-
const int
kStdErrFileno= STDERR_FILENO
-
const char
kUnknownFile[] = "unknown file"
-
const char
kStackTraceMarker[] = "\nStack trace:\n"
-
bool
g_help_flag= false
-
::std::vector<std::string>
g_argvs
-
const TypeId
kTestTypeIdInGoogleTest= GetTestTypeId()
-
constexpr uint32_t
kMaxCodePoint1= (static_cast<uint32_t>(1) << 7) - 1
-
constexpr uint32_t
kMaxCodePoint2= (static_cast<uint32_t>(1) << (5 + 6)) - 1
-
constexpr uint32_t
kMaxCodePoint3= (static_cast<uint32_t>(1) << (4 + 2 * 6)) - 1
-
constexpr uint32_t
kMaxCodePoint4= (static_cast<uint32_t>(1) << (3 + 3 * 6)) - 1
-
static const char
kTypeParamLabel[] = "TypeParam"
-
static const char
kValueParamLabel[] = "GetParam()"
-
static const char
kColorEncodedHelpMessage[]
-
const int
kTypedTestSuites= 1
-
const int
kTypedTests= 1
-
using
-
namespace [anonymous]
-
namespace
testing::internal[anonymous]:: Enums
-
enum
GTestColor Values:
-
enumerator
kDefault
-
enumerator
kRed
-
enumerator
kGreen
-
enumerator
kYellow
-
enumerator
-
enum
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace [anonymous]
-
namespace
testing::internal::edit_distance Functions
-
std::vector<EditType>
CalculateOptimalEdits(const std::vector<size_t> &left, const std::vector<size_t> &right)
-
std::vector<EditType>
CalculateOptimalEdits(const std::vector<std::string> &left, const std::vector<std::string> &right)
-
std::string
CreateUnifiedDiff(const std::vector<std::string> &left, const std::vector<std::string> &right, size_t context)
-
std::vector<EditType>
-
namespace [anonymous]
-
namespace
gmockpp
-
namespace
testing::internal::internal_stream_operator_without_lexical_name_lookup Functions
-
void
operator<<(LookupBlocker, LookupBlocker)
-
void
-
namespace
works_here Typedefs
-
using
OtherName= NotInstantiatedTest
Functions
-
TYPED_TEST_SUITE_P(NotUsedTypeTest)
-
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(NotInstantiatedTest)
-
TEST_P(NotInstantiatedTest, Used)
-
TYPED_TEST_SUITE_P(NotInstantiatedTypeTest)
-
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(NotInstantiatedTypeTest)
-
TYPED_TEST_P(NotInstantiatedTypeTest, Used)
-
REGISTER_TYPED_TEST_SUITE_P(NotInstantiatedTypeTest, Used)
-
using
-
namespace
YAML Functions
-
template<typename
YamlType>
static YamlTypeReadParameter(const YAML::Node &node, const std::string &name) helper function to safely read a yaml parameter
- Template Parameters
YamlType –
- Parameters
node –
name –
- Returns
YamlType
-
template<typename
YamlType>
static voidReadParameter(const YAML::Node &node, const std::string &name, YamlType ¶meter, bool optional = false) helper function to safely read a yaml parameter
- Template Parameters
YamlType –
- Parameters
node –
name –
parameter –
-
template<typename
YamlType>
static voidReadParameterDefault(const YAML::Node &node, const std::string &name, YamlType ¶meter, YamlType default_value)
-
template<typename
YamlType>
voidreadParameter(const YAML::Node &node, const std::string &name, YamlType ¶meter, bool optional = false) helper function to safely read a yaml parameter
- Parameters
node –
name –
optional –
- Template Parameters
YamlType –
- Returns
YamlType
-
template<typename
YamlType>
static YamlTypeReadParameter(const YAML::Node &node, const std::string &name) helper function to safely read a yaml parameter
- Template Parameters
YamlType –
- Parameters
node –
name –
- Returns
YamlType
-
template<typename
-
file
demo_pid.cpp - #include “package_template/pid.hpp”
Example of a simple demo suitable for continuous integration.
- Author
Vincent Berenz license License BSD-3-Clause
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft.
- Date
2019-05-22
- See
https://git-amd.tuebingen.mpg.de/amd-clmc/package_template/wikis/catkin:-how-to-implement-a-demo
Functions
-
void
run_demo() Creates a PID controller and use the API in a small demo.
-
int
main() Execute the run_demo() trhough a try/catch expression.
- Returns
int
-
file
demo_pid_load_from_file.cpp - #include <stdexcept>#include “package_template/file_configuration.hpp”#include “package_template/pid.hpp”
Example of a demo that requires to read a config file.
- Author
Vincent Berenz license License BSD-3-Clause
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft.
- Date
2019-05-22
- See
https://git-amd.tuebingen.mpg.de/amd-clmc/package_template/wikis/catkin:-how-to-implement-a-demo
Functions
-
void
run_demo() Run some demo using a YAML file as configuration for the PID controller.
-
int
main() Run the demo in a safe environment.
-
file
gmock-actions.h - #include <errno.h>#include <algorithm>#include <functional>#include <memory>#include <string>#include <tuple>#include <type_traits>#include <utility>#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-port.h”#include “gmock/internal/gmock-pp.h”
Defines
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value)¶
-
GMOCK_INTERNAL_ARG_UNUSED(i, data, el)¶
-
GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_¶
-
GMOCK_INTERNAL_ARG(i, data, el)¶
-
GMOCK_ACTION_ARG_TYPES_AND_NAMES_¶
-
GMOCK_INTERNAL_TEMPLATE_ARG(i, data, el)¶
-
GMOCK_ACTION_TEMPLATE_ARGS_NAMES_¶
-
GMOCK_INTERNAL_TYPENAME_PARAM(i, data, param)¶
-
GMOCK_ACTION_TYPENAME_PARAMS_(params)¶
-
GMOCK_INTERNAL_TYPE_PARAM(i, data, param)¶
-
GMOCK_ACTION_TYPE_PARAMS_(params)¶
-
GMOCK_INTERNAL_TYPE_GVALUE_PARAM(i, data, param)¶
-
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)¶
-
GMOCK_INTERNAL_GVALUE_PARAM(i, data, param)¶
-
GMOCK_ACTION_GVALUE_PARAMS_(params)¶
-
GMOCK_INTERNAL_INIT_PARAM(i, data, param)¶
-
GMOCK_ACTION_INIT_PARAMS_(params)¶
-
GMOCK_INTERNAL_FIELD_PARAM(i, data, param)¶
-
GMOCK_ACTION_FIELD_PARAMS_(params)¶
-
GMOCK_INTERNAL_ACTION(name, full_name, params)¶
-
ACTION(name)¶
-
ACTION_P(name, ...)¶
-
ACTION_P2(name, ...)¶
-
ACTION_P3(name, ...)¶
-
ACTION_P4(name, ...)¶
-
ACTION_P5(name, ...)¶
-
ACTION_P6(name, ...)¶
-
ACTION_P7(name, ...)¶
-
ACTION_P8(name, ...)¶
-
ACTION_P9(name, ...)¶
-
ACTION_P10(name, ...)¶
-
-
file
gmock-actions.h - #include <errno.h>#include <algorithm>#include <functional>#include <memory>#include <string>#include <tuple>#include <type_traits>#include <utility>#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-port.h”#include “gmock/internal/gmock-pp.h”
Defines
-
GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value)
-
GMOCK_INTERNAL_ARG_UNUSED(i, data, el)
-
GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_
-
GMOCK_INTERNAL_ARG(i, data, el)
-
GMOCK_ACTION_ARG_TYPES_AND_NAMES_
-
GMOCK_INTERNAL_TEMPLATE_ARG(i, data, el)
-
GMOCK_ACTION_TEMPLATE_ARGS_NAMES_
-
GMOCK_INTERNAL_TYPENAME_PARAM(i, data, param)
-
GMOCK_ACTION_TYPENAME_PARAMS_(params)
-
GMOCK_INTERNAL_TYPE_PARAM(i, data, param)
-
GMOCK_ACTION_TYPE_PARAMS_(params)
-
GMOCK_INTERNAL_TYPE_GVALUE_PARAM(i, data, param)
-
GMOCK_ACTION_TYPE_GVALUE_PARAMS_(params)
-
GMOCK_INTERNAL_GVALUE_PARAM(i, data, param)
-
GMOCK_ACTION_GVALUE_PARAMS_(params)
-
GMOCK_INTERNAL_INIT_PARAM(i, data, param)
-
GMOCK_ACTION_INIT_PARAMS_(params)
-
GMOCK_INTERNAL_FIELD_PARAM(i, data, param)
-
GMOCK_ACTION_FIELD_PARAMS_(params)
-
GMOCK_INTERNAL_ACTION(name, full_name, params)
-
ACTION(name)
-
ACTION_P(name, ...)
-
ACTION_P2(name, ...)
-
ACTION_P3(name, ...)
-
ACTION_P4(name, ...)
-
ACTION_P5(name, ...)
-
ACTION_P6(name, ...)
-
ACTION_P7(name, ...)
-
ACTION_P8(name, ...)
-
ACTION_P9(name, ...)
-
ACTION_P10(name, ...)
-
-
file
gmock-cardinalities.h - #include <limits.h>#include <memory>#include <ostream>#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gmock-cardinalities.h - #include <limits.h>#include <memory>#include <ostream>#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gmock-function-mocker.h - #include <type_traits>#include <utility>#include “gmock/gmock-spec-builders.h”#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-pp.h”
Defines
-
GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_¶
-
MOCK_METHOD(...)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_1(...)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_2(...)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_3(_Ret, _MethodName, _Args)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, _Spec)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_5(...)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_6(...)¶
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_7(...)¶
-
GMOCK_INTERNAL_WRONG_ARITY(...)¶
-
GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Tuple)¶
-
GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(_N, ...)¶
-
GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec)¶
-
GMOCK_INTERNAL_MOCK_METHOD_IMPL(_N, _MethodName, _Constness, _Override, _Final, _NoexceptSpec, _CallType, _RefSpec, _Signature)¶
-
GMOCK_INTERNAL_EXPAND(...)¶
-
GMOCK_INTERNAL_HAS_CONST(_Tuple)¶
-
GMOCK_INTERNAL_HAS_OVERRIDE(_Tuple)¶
-
GMOCK_INTERNAL_HAS_FINAL(_Tuple)¶
-
GMOCK_INTERNAL_GET_NOEXCEPT_SPEC(_Tuple)¶
-
GMOCK_INTERNAL_NOEXCEPT_SPEC_IF_NOEXCEPT(_i, _, _elem)¶
-
GMOCK_INTERNAL_GET_REF_SPEC(_Tuple)¶
-
GMOCK_INTERNAL_REF_SPEC_IF_REF(_i, _, _elem)¶
-
GMOCK_INTERNAL_GET_CALLTYPE(_Tuple)¶
-
GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT(_i, _, _elem)¶
-
GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem)¶
-
GMOCK_INTERNAL_DETECT_CONST_I_const¶
-
GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem)¶
-
GMOCK_INTERNAL_DETECT_OVERRIDE_I_override¶
-
GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem)¶
-
GMOCK_INTERNAL_DETECT_FINAL_I_final¶
-
GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)¶
-
GMOCK_INTERNAL_DETECT_NOEXCEPT_I_noexcept¶
-
GMOCK_INTERNAL_DETECT_REF(_i, _, _elem)¶
-
GMOCK_INTERNAL_DETECT_REF_I_ref¶
-
GMOCK_INTERNAL_UNPACK_ref(x)¶
-
GMOCK_INTERNAL_GET_CALLTYPE_IMPL(_i, _, _elem)¶
-
GMOCK_INTERNAL_IS_CALLTYPE(_arg)¶
-
GMOCK_INTERNAL_IS_CALLTYPE_I(_arg)¶
-
GMOCK_INTERNAL_GET_VALUE_CALLTYPE(_arg)¶
-
GMOCK_INTERNAL_GET_VALUE_CALLTYPE_I(_arg)¶
-
GMOCK_INTERNAL_IS_CALLTYPE_HELPER_Calltype¶
-
GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)¶
-
GMOCK_INTERNAL_GET_TYPE(_i, _, _elem)¶
-
GMOCK_INTERNAL_PARAMETER(_i, _Signature, _)¶
-
GMOCK_INTERNAL_FORWARD_ARG(_i, _Signature, _)¶
-
GMOCK_INTERNAL_MATCHER_PARAMETER(_i, _Signature, _)¶
-
GMOCK_INTERNAL_MATCHER_ARGUMENT(_i, _1, _2)¶
-
GMOCK_INTERNAL_A_MATCHER_ARGUMENT(_i, _Signature, _)¶
-
GMOCK_INTERNAL_ARG_O(_i, ...)¶
-
GMOCK_INTERNAL_MATCHER_O(_i, ...)¶
-
MOCK_METHOD0(m, ...)¶
-
MOCK_METHOD1(m, ...)¶
-
MOCK_METHOD2(m, ...)¶
-
MOCK_METHOD3(m, ...)¶
-
MOCK_METHOD4(m, ...)¶
-
MOCK_METHOD5(m, ...)¶
-
MOCK_METHOD6(m, ...)¶
-
MOCK_METHOD7(m, ...)¶
-
MOCK_METHOD8(m, ...)¶
-
MOCK_METHOD9(m, ...)¶
-
MOCK_METHOD10(m, ...)¶
-
MOCK_CONST_METHOD0(m, ...)¶
-
MOCK_CONST_METHOD1(m, ...)¶
-
MOCK_CONST_METHOD2(m, ...)¶
-
MOCK_CONST_METHOD3(m, ...)¶
-
MOCK_CONST_METHOD4(m, ...)¶
-
MOCK_CONST_METHOD5(m, ...)¶
-
MOCK_CONST_METHOD6(m, ...)¶
-
MOCK_CONST_METHOD7(m, ...)¶
-
MOCK_CONST_METHOD8(m, ...)¶
-
MOCK_CONST_METHOD9(m, ...)¶
-
MOCK_CONST_METHOD10(m, ...)¶
-
MOCK_METHOD0_T(m, ...)¶
-
MOCK_METHOD1_T(m, ...)¶
-
MOCK_METHOD2_T(m, ...)¶
-
MOCK_METHOD3_T(m, ...)¶
-
MOCK_METHOD4_T(m, ...)¶
-
MOCK_METHOD5_T(m, ...)¶
-
MOCK_METHOD6_T(m, ...)¶
-
MOCK_METHOD7_T(m, ...)¶
-
MOCK_METHOD8_T(m, ...)¶
-
MOCK_METHOD9_T(m, ...)¶
-
MOCK_METHOD10_T(m, ...)¶
-
MOCK_CONST_METHOD0_T(m, ...)¶
-
MOCK_CONST_METHOD1_T(m, ...)¶
-
MOCK_CONST_METHOD2_T(m, ...)¶
-
MOCK_CONST_METHOD3_T(m, ...)¶
-
MOCK_CONST_METHOD4_T(m, ...)¶
-
MOCK_CONST_METHOD5_T(m, ...)¶
-
MOCK_CONST_METHOD6_T(m, ...)¶
-
MOCK_CONST_METHOD7_T(m, ...)¶
-
MOCK_CONST_METHOD8_T(m, ...)¶
-
MOCK_CONST_METHOD9_T(m, ...)¶
-
MOCK_CONST_METHOD10_T(m, ...)¶
-
MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...)¶
-
MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...)¶
-
GMOCK_INTERNAL_MOCK_METHODN(constness, ct, Method, args_num, ...)¶
-
GMOCK_MOCKER_(arity, constness, Method)¶
-
-
file
gmock-function-mocker.h - #include <type_traits>#include <utility>#include “gmock/gmock-spec-builders.h”#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-pp.h”
Defines
-
GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_GMOCK_FUNCTION_MOCKER_H_
-
MOCK_METHOD(...)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_1(...)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_2(...)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_3(_Ret, _MethodName, _Args)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_4(_Ret, _MethodName, _Args, _Spec)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_5(...)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_6(...)
-
GMOCK_INTERNAL_MOCK_METHOD_ARG_7(...)
-
GMOCK_INTERNAL_WRONG_ARITY(...)
-
GMOCK_INTERNAL_ASSERT_PARENTHESIS(_Tuple)
-
GMOCK_INTERNAL_ASSERT_VALID_SIGNATURE(_N, ...)
-
GMOCK_INTERNAL_ASSERT_VALID_SPEC(_Spec)
-
GMOCK_INTERNAL_MOCK_METHOD_IMPL(_N, _MethodName, _Constness, _Override, _Final, _NoexceptSpec, _CallType, _RefSpec, _Signature)
-
GMOCK_INTERNAL_EXPAND(...)
-
GMOCK_INTERNAL_HAS_CONST(_Tuple)
-
GMOCK_INTERNAL_HAS_OVERRIDE(_Tuple)
-
GMOCK_INTERNAL_HAS_FINAL(_Tuple)
-
GMOCK_INTERNAL_GET_NOEXCEPT_SPEC(_Tuple)
-
GMOCK_INTERNAL_NOEXCEPT_SPEC_IF_NOEXCEPT(_i, _, _elem)
-
GMOCK_INTERNAL_GET_REF_SPEC(_Tuple)
-
GMOCK_INTERNAL_REF_SPEC_IF_REF(_i, _, _elem)
-
GMOCK_INTERNAL_GET_CALLTYPE(_Tuple)
-
GMOCK_INTERNAL_ASSERT_VALID_SPEC_ELEMENT(_i, _, _elem)
-
GMOCK_INTERNAL_DETECT_CONST(_i, _, _elem)
-
GMOCK_INTERNAL_DETECT_CONST_I_const
-
GMOCK_INTERNAL_DETECT_OVERRIDE(_i, _, _elem)
-
GMOCK_INTERNAL_DETECT_OVERRIDE_I_override
-
GMOCK_INTERNAL_DETECT_FINAL(_i, _, _elem)
-
GMOCK_INTERNAL_DETECT_FINAL_I_final
-
GMOCK_INTERNAL_DETECT_NOEXCEPT(_i, _, _elem)
-
GMOCK_INTERNAL_DETECT_NOEXCEPT_I_noexcept
-
GMOCK_INTERNAL_DETECT_REF(_i, _, _elem)
-
GMOCK_INTERNAL_DETECT_REF_I_ref
-
GMOCK_INTERNAL_UNPACK_ref(x)
-
GMOCK_INTERNAL_GET_CALLTYPE_IMPL(_i, _, _elem)
-
GMOCK_INTERNAL_IS_CALLTYPE(_arg)
-
GMOCK_INTERNAL_IS_CALLTYPE_I(_arg)
-
GMOCK_INTERNAL_GET_VALUE_CALLTYPE(_arg)
-
GMOCK_INTERNAL_GET_VALUE_CALLTYPE_I(_arg)
-
GMOCK_INTERNAL_IS_CALLTYPE_HELPER_Calltype
-
GMOCK_INTERNAL_SIGNATURE(_Ret, _Args)
-
GMOCK_INTERNAL_GET_TYPE(_i, _, _elem)
-
GMOCK_INTERNAL_PARAMETER(_i, _Signature, _)
-
GMOCK_INTERNAL_FORWARD_ARG(_i, _Signature, _)
-
GMOCK_INTERNAL_MATCHER_PARAMETER(_i, _Signature, _)
-
GMOCK_INTERNAL_MATCHER_ARGUMENT(_i, _1, _2)
-
GMOCK_INTERNAL_A_MATCHER_ARGUMENT(_i, _Signature, _)
-
GMOCK_INTERNAL_ARG_O(_i, ...)
-
GMOCK_INTERNAL_MATCHER_O(_i, ...)
-
MOCK_METHOD0(m, ...)
-
MOCK_METHOD1(m, ...)
-
MOCK_METHOD2(m, ...)
-
MOCK_METHOD3(m, ...)
-
MOCK_METHOD4(m, ...)
-
MOCK_METHOD5(m, ...)
-
MOCK_METHOD6(m, ...)
-
MOCK_METHOD7(m, ...)
-
MOCK_METHOD8(m, ...)
-
MOCK_METHOD9(m, ...)
-
MOCK_METHOD10(m, ...)
-
MOCK_CONST_METHOD0(m, ...)
-
MOCK_CONST_METHOD1(m, ...)
-
MOCK_CONST_METHOD2(m, ...)
-
MOCK_CONST_METHOD3(m, ...)
-
MOCK_CONST_METHOD4(m, ...)
-
MOCK_CONST_METHOD5(m, ...)
-
MOCK_CONST_METHOD6(m, ...)
-
MOCK_CONST_METHOD7(m, ...)
-
MOCK_CONST_METHOD8(m, ...)
-
MOCK_CONST_METHOD9(m, ...)
-
MOCK_CONST_METHOD10(m, ...)
-
MOCK_METHOD0_T(m, ...)
-
MOCK_METHOD1_T(m, ...)
-
MOCK_METHOD2_T(m, ...)
-
MOCK_METHOD3_T(m, ...)
-
MOCK_METHOD4_T(m, ...)
-
MOCK_METHOD5_T(m, ...)
-
MOCK_METHOD6_T(m, ...)
-
MOCK_METHOD7_T(m, ...)
-
MOCK_METHOD8_T(m, ...)
-
MOCK_METHOD9_T(m, ...)
-
MOCK_METHOD10_T(m, ...)
-
MOCK_CONST_METHOD0_T(m, ...)
-
MOCK_CONST_METHOD1_T(m, ...)
-
MOCK_CONST_METHOD2_T(m, ...)
-
MOCK_CONST_METHOD3_T(m, ...)
-
MOCK_CONST_METHOD4_T(m, ...)
-
MOCK_CONST_METHOD5_T(m, ...)
-
MOCK_CONST_METHOD6_T(m, ...)
-
MOCK_CONST_METHOD7_T(m, ...)
-
MOCK_CONST_METHOD8_T(m, ...)
-
MOCK_CONST_METHOD9_T(m, ...)
-
MOCK_CONST_METHOD10_T(m, ...)
-
MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...)
-
MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...)
-
GMOCK_INTERNAL_MOCK_METHODN(constness, ct, Method, args_num, ...)
-
GMOCK_MOCKER_(arity, constness, Method)
-
-
file
gmock-matchers.h - #include <algorithm>#include <cmath>#include <initializer_list>#include <iterator>#include <limits>#include <memory>#include <ostream>#include <sstream>#include <string>#include <type_traits>#include <utility>#include <vector>#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-port.h”#include “gmock/internal/gmock-pp.h”#include “gtest/gtest.h”#include “gmock/internal/custom/gmock-matchers.h”
Defines
-
GMOCK_MAYBE_5046_¶ << DiffStrings(str, arg);
-
ASSERT_THAT(value, matcher)¶
-
EXPECT_THAT(value, matcher)¶
-
MATCHER(name, description)¶
-
MATCHER_P(name, p0, description)¶
-
MATCHER_P2(name, p0, p1, description)¶
-
MATCHER_P3(name, p0, p1, p2, description)¶
-
MATCHER_P4(name, p0, p1, p2, p3, description)¶
-
MATCHER_P5(name, p0, p1, p2, p3, p4, description)¶
-
MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)¶
-
MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)¶
-
MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)¶
-
MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)¶
-
MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)¶
-
GMOCK_INTERNAL_MATCHER(name, full_name, description, args)¶
-
GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args)¶
-
GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAM(i_unused, data_unused, arg)¶
-
GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)¶
-
GMOCK_INTERNAL_MATCHER_TYPE_PARAM(i_unused, data_unused, arg)¶
-
GMOCK_INTERNAL_MATCHER_FUNCTION_ARGS(args)¶
-
GMOCK_INTERNAL_MATCHER_FUNCTION_ARG(i, data_unused, arg)¶
-
GMOCK_INTERNAL_MATCHER_FORWARD_ARGS(args)¶
-
GMOCK_INTERNAL_MATCHER_FORWARD_ARG(i, data_unused, arg)¶
-
GMOCK_INTERNAL_MATCHER_MEMBERS(args)¶
-
GMOCK_INTERNAL_MATCHER_MEMBER(i_unused, data_unused, arg)¶
-
GMOCK_INTERNAL_MATCHER_MEMBERS_USAGE(args)¶
-
GMOCK_INTERNAL_MATCHER_MEMBER_USAGE(i_unused, data_unused, arg)¶
-
GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args)¶
-
GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg_unused)¶
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251 GMOCK_MAYBE_5046_) namespace testing
-
-
file
gmock-matchers.h - #include <algorithm>#include <cmath>#include <initializer_list>#include <iterator>#include <limits>#include <memory>#include <ostream>#include <sstream>#include <string>#include <type_traits>#include <utility>#include <vector>#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-port.h”#include “gmock/internal/gmock-pp.h”#include “gtest/gtest.h”#include “gmock/internal/custom/gmock-matchers.h”
Defines
-
GMOCK_MAYBE_5046_ << DiffStrings(str, arg);
-
ASSERT_THAT(value, matcher)
-
EXPECT_THAT(value, matcher)
-
MATCHER(name, description)
-
MATCHER_P(name, p0, description)
-
MATCHER_P2(name, p0, p1, description)
-
MATCHER_P3(name, p0, p1, p2, description)
-
MATCHER_P4(name, p0, p1, p2, p3, description)
-
MATCHER_P5(name, p0, p1, p2, p3, p4, description)
-
MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)
-
MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)
-
MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)
-
MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)
-
MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)
-
GMOCK_INTERNAL_MATCHER(name, full_name, description, args)
-
GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAMS(args)
-
GMOCK_INTERNAL_MATCHER_TEMPLATE_PARAM(i_unused, data_unused, arg)
-
GMOCK_INTERNAL_MATCHER_TYPE_PARAMS(args)
-
GMOCK_INTERNAL_MATCHER_TYPE_PARAM(i_unused, data_unused, arg)
-
GMOCK_INTERNAL_MATCHER_FUNCTION_ARGS(args)
-
GMOCK_INTERNAL_MATCHER_FUNCTION_ARG(i, data_unused, arg)
-
GMOCK_INTERNAL_MATCHER_FORWARD_ARGS(args)
-
GMOCK_INTERNAL_MATCHER_FORWARD_ARG(i, data_unused, arg)
-
GMOCK_INTERNAL_MATCHER_MEMBERS(args)
-
GMOCK_INTERNAL_MATCHER_MEMBER(i_unused, data_unused, arg)
-
GMOCK_INTERNAL_MATCHER_MEMBERS_USAGE(args)
-
GMOCK_INTERNAL_MATCHER_MEMBER_USAGE(i_unused, data_unused, arg)
-
GMOCK_INTERNAL_MATCHER_ARGS_USAGE(args)
-
GMOCK_INTERNAL_MATCHER_ARG_USAGE(i, data_unused, arg_unused)
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251 GMOCK_MAYBE_5046_) namespace testing
-
-
file
gmock-more-actions.h - #include <memory>#include <utility>#include “gmock/gmock-actions.h”#include “gmock/internal/gmock-port.h”#include “gmock/internal/custom/gmock-generated-actions.h”
Defines
-
GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0)¶
-
GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, name1)¶
-
GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2)¶
-
GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3)¶
-
GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4)¶
-
GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5)¶
-
GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6)¶
-
GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7)¶
-
GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8)¶
-
GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8, kind9, name9)¶
-
GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0)¶
-
GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, name1)¶
-
GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2)¶
-
GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3)¶
-
GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4)¶
-
GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5)¶
-
GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6)¶
-
GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7)¶
-
GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8)¶
-
GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8, kind9, name9)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_1_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_2_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_3_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_4_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_5_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_6_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_7_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_8_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_9_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_COPY_AND_10_VALUE_PARAMS(...)¶
-
GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()¶
-
GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0)¶
-
GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1)¶
-
GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2)¶
-
GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)¶
-
GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)¶
-
GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)¶
-
GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)¶
-
GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)¶
-
GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)¶
-
GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)¶
-
GMOCK_ACTION_CLASS_(name, value_params)¶
-
ACTION_TEMPLATE(name, template_params, value_params)¶
-
-
file
gmock-more-actions.h - #include <memory>#include <utility>#include “gmock/gmock-actions.h”#include “gmock/internal/gmock-port.h”#include “gmock/internal/custom/gmock-generated-actions.h”
Defines
-
GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0)
-
GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, name1)
-
GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2)
-
GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3)
-
GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4)
-
GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5)
-
GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6)
-
GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7)
-
GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8)
-
GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8, kind9, name9)
-
GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0)
-
GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, name1)
-
GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2)
-
GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3)
-
GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4)
-
GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5)
-
GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6)
-
GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7)
-
GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8)
-
GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, kind7, name7, kind8, name8, kind9, name9)
-
GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_INTERNAL_DEFN_COPY_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_DEFN_COPY_AND_1_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_2_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_3_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_4_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_5_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_6_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_7_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_8_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_9_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_COPY_AND_10_VALUE_PARAMS(...)
-
GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS()
-
GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0)
-
GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1)
-
GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2)
-
GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)
-
GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)
-
GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)
-
GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)
-
GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)
-
GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)
-
GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
-
GMOCK_ACTION_CLASS_(name, value_params)
-
ACTION_TEMPLATE(name, template_params, value_params)
-
-
file
gmock-more-matchers.h - #include “gmock/gmock-matchers.h”
-
file
gmock-more-matchers.h - #include “gmock/gmock-matchers.h”
-
file
gmock-nice-strict.h - #include <type_traits>#include “gmock/gmock-spec-builders.h”#include “gmock/internal/gmock-port.h”
Defines
-
GTEST_INTERNAL_EMPTY_BASE_CLASS¶
-
-
file
gmock-nice-strict.h - #include <type_traits>#include “gmock/gmock-spec-builders.h”#include “gmock/internal/gmock-port.h”
Defines
-
GTEST_INTERNAL_EMPTY_BASE_CLASS
-
-
file
gmock-spec-builders.h - #include <functional>#include <map>#include <memory>#include <set>#include <sstream>#include <string>#include <type_traits>#include <utility>#include <vector>#include “gmock/gmock-actions.h”#include “gmock/gmock-cardinalities.h”#include “gmock/gmock-matchers.h”#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gmock-spec-builders.h - #include <functional>#include <map>#include <memory>#include <set>#include <sstream>#include <string>#include <type_traits>#include <utility>#include <vector>#include “gmock/gmock-actions.h”#include “gmock/gmock-cardinalities.h”#include “gmock/gmock-matchers.h”#include “gmock/internal/gmock-internal-utils.h”#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”
Defines
-
GMOCK_ON_CALL_IMPL_(mock_expr, Setter, call)
-
ON_CALL(obj, call)
-
EXPECT_CALL(obj, call)
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gmock.h - #include “gmock/gmock-actions.h”#include “gmock/gmock-cardinalities.h”#include “gmock/gmock-function-mocker.h”#include “gmock/gmock-matchers.h”#include “gmock/gmock-more-actions.h”#include “gmock/gmock-more-matchers.h”#include “gmock/gmock-nice-strict.h”#include “gmock/internal/gmock-internal-utils.h”
-
file
gmock.h - #include “gmock/gmock-actions.h”#include “gmock/gmock-cardinalities.h”#include “gmock/gmock-function-mocker.h”#include “gmock/gmock-matchers.h”#include “gmock/gmock-more-actions.h”#include “gmock/gmock-more-matchers.h”#include “gmock/gmock-nice-strict.h”#include “gmock/internal/gmock-internal-utils.h”
-
file
gtest-death-test.h - #include “gtest/internal/gtest-death-test-internal.h”
-
file
gtest-death-test.h - #include “gtest/internal/gtest-death-test-internal.h”
Defines
-
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator)
-
EXPECT_DEATH_IF_SUPPORTED(statement, regex)
-
ASSERT_DEATH_IF_SUPPORTED(statement, regex)
-
-
file
gtest-matchers.h - #include <atomic>#include <memory>#include <ostream>#include <string>#include <type_traits>#include “gtest/gtest-printers.h”#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”
Defines
-
GTEST_MAYBE_5046_¶
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251 GTEST_MAYBE_5046_) namespace testing
-
-
file
gtest-matchers.h - #include <atomic>#include <memory>#include <ostream>#include <string>#include <type_traits>#include “gtest/gtest-printers.h”#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”
Defines
-
GTEST_MAYBE_5046_
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251 GTEST_MAYBE_5046_) namespace testing
-
-
file
gtest-message.h - #include <limits>#include <memory>#include <sstream>#include “gtest/internal/gtest-port.h”
-
file
gtest-message.h - #include <limits>#include <memory>#include <sstream>#include “gtest/internal/gtest-port.h”
-
file
gtest-param-test.h - #include <iterator>#include <utility>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-param-util.h”#include “gtest/internal/gtest-port.h”
-
file
gtest-param-test.h - #include <iterator>#include <utility>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-param-util.h”#include “gtest/internal/gtest-port.h”
Defines
-
TEST_P(test_suite_name, test_name)
-
GTEST_EXPAND_(arg)
-
GTEST_GET_FIRST_(first, ...)
-
GTEST_GET_SECOND_(first, second, ...)
-
INSTANTIATE_TEST_SUITE_P(prefix, test_suite_name, ...)
-
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(T)
-
INSTANTIATE_TEST_CASE_P
-
-
file
gtest-printers.h - #include <functional>#include <memory>#include <ostream>#include <sstream>#include <string>#include <tuple>#include <type_traits>#include <utility>#include <vector>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”#include “gtest/internal/custom/gtest-printers.h”
-
file
gtest-printers.h - #include <functional>#include <memory>#include <ostream>#include <sstream>#include <string>#include <tuple>#include <type_traits>#include <utility>#include <vector>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”#include “gtest/internal/custom/gtest-printers.h”
Defines
-
GTEST_IMPL_FORMAT_C_STRING_AS_POINTER_(CharType)
-
GTEST_IMPL_FORMAT_C_STRING_AS_STRING_(CharType, OtherStringType)
-
-
file
gtest-spi.h - #include “gtest/gtest.h”
Defines
-
EXPECT_FATAL_FAILURE(statement, substr)¶
-
EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr)¶
-
EXPECT_NONFATAL_FAILURE(statement, substr)¶
-
EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr)¶
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gtest-spi.h - #include “gtest/gtest.h”
Defines
-
EXPECT_FATAL_FAILURE(statement, substr)
-
EXPECT_FATAL_FAILURE_ON_ALL_THREADS(statement, substr)
-
EXPECT_NONFATAL_FAILURE(statement, substr)
-
EXPECT_NONFATAL_FAILURE_ON_ALL_THREADS(statement, substr)
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gtest-test-part.h - #include <iosfwd>#include <vector>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-string.h”
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gtest-test-part.h - #include <iosfwd>#include <vector>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-string.h”
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gtest-typed-test.h - #include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”#include “gtest/internal/gtest-type-util.h”
Defines
-
GTEST_TYPE_PARAMS_(TestSuiteName)¶
-
GTEST_NAME_GENERATOR_(TestSuiteName)¶
-
TYPED_TEST_SUITE(CaseName, Types, ...)¶
-
TYPED_TEST(CaseName, TestName)¶
-
TYPED_TEST_CASE¶
-
GTEST_SUITE_NAMESPACE_(TestSuiteName)¶
-
GTEST_TYPED_TEST_SUITE_P_STATE_(TestSuiteName)¶
-
GTEST_REGISTERED_TEST_NAMES_(TestSuiteName)¶
-
TYPED_TEST_SUITE_P(SuiteName)¶
-
TYPED_TEST_CASE_P¶
-
TYPED_TEST_P(SuiteName, TestName)¶
-
REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...)¶
-
REGISTER_TYPED_TEST_CASE_P¶
-
INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...)¶
-
INSTANTIATE_TYPED_TEST_CASE_P¶
-
-
file
gtest-typed-test.h - #include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”#include “gtest/internal/gtest-type-util.h”
Defines
-
GTEST_TYPE_PARAMS_(TestSuiteName)
-
GTEST_NAME_GENERATOR_(TestSuiteName)
-
TYPED_TEST_SUITE(CaseName, Types, ...)
-
TYPED_TEST(CaseName, TestName)
-
TYPED_TEST_CASE
-
GTEST_SUITE_NAMESPACE_(TestSuiteName)
-
GTEST_TYPED_TEST_SUITE_P_STATE_(TestSuiteName)
-
GTEST_REGISTERED_TEST_NAMES_(TestSuiteName)
-
TYPED_TEST_SUITE_P(SuiteName)
-
TYPED_TEST_CASE_P
-
TYPED_TEST_P(SuiteName, TestName)
-
REGISTER_TYPED_TEST_SUITE_P(SuiteName, ...)
-
REGISTER_TYPED_TEST_CASE_P
-
INSTANTIATE_TYPED_TEST_SUITE_P(Prefix, SuiteName, Types, ...)
-
INSTANTIATE_TYPED_TEST_CASE_P
-
-
file
gtest.h - #include <cstddef>#include <limits>#include <memory>#include <ostream>#include <type_traits>#include <vector>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-string.h”#include “gtest/gtest-death-test.h”#include “gtest/gtest-matchers.h”#include “gtest/gtest-message.h”#include “gtest/gtest-param-test.h”#include “gtest/gtest-printers.h”#include “gtest/gtest_prod.h”#include “gtest/gtest-test-part.h”#include “gtest/gtest-typed-test.h”#include “gtest/gtest_pred_impl.h”
Defines
-
GTEST_IMPL_CMP_HELPER_(op_name, op)¶
-
GTEST_SKIP()¶
-
ADD_FAILURE()¶
-
ADD_FAILURE_AT(file, line)¶
-
GTEST_FAIL()¶
-
GTEST_FAIL_AT(file, line)¶
-
FAIL()¶
-
GTEST_SUCCEED()¶
-
SUCCEED()¶
-
EXPECT_THROW(statement, expected_exception)¶
-
EXPECT_NO_THROW(statement)¶
-
EXPECT_ANY_THROW(statement)¶
-
ASSERT_THROW(statement, expected_exception)¶
-
ASSERT_NO_THROW(statement)¶
-
ASSERT_ANY_THROW(statement)¶
-
GTEST_EXPECT_TRUE(condition)¶
-
GTEST_EXPECT_FALSE(condition)¶
-
GTEST_ASSERT_TRUE(condition)¶
-
GTEST_ASSERT_FALSE(condition)¶
-
EXPECT_TRUE(condition)¶
-
EXPECT_FALSE(condition)¶
-
ASSERT_TRUE(condition)¶
-
ASSERT_FALSE(condition)¶
-
EXPECT_EQ(val1, val2)¶
-
EXPECT_NE(val1, val2)¶
-
EXPECT_LE(val1, val2)¶
-
EXPECT_LT(val1, val2)¶
-
EXPECT_GE(val1, val2)¶
-
EXPECT_GT(val1, val2)¶
-
GTEST_ASSERT_EQ(val1, val2)¶
-
GTEST_ASSERT_NE(val1, val2)¶
-
GTEST_ASSERT_LE(val1, val2)¶
-
GTEST_ASSERT_LT(val1, val2)¶
-
GTEST_ASSERT_GE(val1, val2)¶
-
GTEST_ASSERT_GT(val1, val2)¶
-
ASSERT_EQ(val1, val2)¶
-
ASSERT_NE(val1, val2)¶
-
ASSERT_LE(val1, val2)¶
-
ASSERT_LT(val1, val2)¶
-
ASSERT_GE(val1, val2)¶
-
ASSERT_GT(val1, val2)¶
-
EXPECT_STREQ(s1, s2)¶
-
EXPECT_STRNE(s1, s2)¶
-
EXPECT_STRCASEEQ(s1, s2)¶
-
EXPECT_STRCASENE(s1, s2)¶
-
ASSERT_STREQ(s1, s2)¶
-
ASSERT_STRNE(s1, s2)¶
-
ASSERT_STRCASEEQ(s1, s2)¶
-
ASSERT_STRCASENE(s1, s2)¶
-
EXPECT_FLOAT_EQ(val1, val2)¶
-
EXPECT_DOUBLE_EQ(val1, val2)¶
-
ASSERT_FLOAT_EQ(val1, val2)¶
-
ASSERT_DOUBLE_EQ(val1, val2)¶
-
EXPECT_NEAR(val1, val2, abs_error)¶
-
ASSERT_NEAR(val1, val2, abs_error)¶
-
ASSERT_NO_FATAL_FAILURE(statement)¶
-
EXPECT_NO_FATAL_FAILURE(statement)¶
-
SCOPED_TRACE(message)¶
-
GTEST_TEST(test_suite_name, test_name)¶
-
TEST(test_suite_name, test_name)¶
-
TEST_F(test_fixture, test_name)¶
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
inline int RUN_ALL_TESTS () GTEST_MUST_USE_RESULT_
-
-
file
gtest.h - #include <cstddef>#include <limits>#include <memory>#include <ostream>#include <type_traits>#include <vector>#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-string.h”#include “gtest/gtest-death-test.h”#include “gtest/gtest-matchers.h”#include “gtest/gtest-message.h”#include “gtest/gtest-param-test.h”#include “gtest/gtest-printers.h”#include “gtest/gtest_prod.h”#include “gtest/gtest-test-part.h”#include “gtest/gtest-typed-test.h”#include “gtest/gtest_pred_impl.h”
Defines
-
GTEST_IMPL_CMP_HELPER_(op_name, op)
-
GTEST_SKIP()
-
ADD_FAILURE()
-
ADD_FAILURE_AT(file, line)
-
GTEST_FAIL()
-
GTEST_FAIL_AT(file, line)
-
FAIL()
-
GTEST_SUCCEED()
-
SUCCEED()
-
EXPECT_THROW(statement, expected_exception)
-
EXPECT_NO_THROW(statement)
-
EXPECT_ANY_THROW(statement)
-
ASSERT_THROW(statement, expected_exception)
-
ASSERT_NO_THROW(statement)
-
ASSERT_ANY_THROW(statement)
-
GTEST_EXPECT_TRUE(condition)
-
GTEST_EXPECT_FALSE(condition)
-
GTEST_ASSERT_TRUE(condition)
-
GTEST_ASSERT_FALSE(condition)
-
EXPECT_TRUE(condition)
-
EXPECT_FALSE(condition)
-
ASSERT_TRUE(condition)
-
ASSERT_FALSE(condition)
-
EXPECT_EQ(val1, val2)
-
EXPECT_NE(val1, val2)
-
EXPECT_LE(val1, val2)
-
EXPECT_LT(val1, val2)
-
EXPECT_GE(val1, val2)
-
EXPECT_GT(val1, val2)
-
GTEST_ASSERT_EQ(val1, val2)
-
GTEST_ASSERT_NE(val1, val2)
-
GTEST_ASSERT_LE(val1, val2)
-
GTEST_ASSERT_LT(val1, val2)
-
GTEST_ASSERT_GE(val1, val2)
-
GTEST_ASSERT_GT(val1, val2)
-
ASSERT_EQ(val1, val2)
-
ASSERT_NE(val1, val2)
-
ASSERT_LE(val1, val2)
-
ASSERT_LT(val1, val2)
-
ASSERT_GE(val1, val2)
-
ASSERT_GT(val1, val2)
-
EXPECT_STREQ(s1, s2)
-
EXPECT_STRNE(s1, s2)
-
EXPECT_STRCASEEQ(s1, s2)
-
EXPECT_STRCASENE(s1, s2)
-
ASSERT_STREQ(s1, s2)
-
ASSERT_STRNE(s1, s2)
-
ASSERT_STRCASEEQ(s1, s2)
-
ASSERT_STRCASENE(s1, s2)
-
EXPECT_FLOAT_EQ(val1, val2)
-
EXPECT_DOUBLE_EQ(val1, val2)
-
ASSERT_FLOAT_EQ(val1, val2)
-
ASSERT_DOUBLE_EQ(val1, val2)
-
EXPECT_NEAR(val1, val2, abs_error)
-
ASSERT_NEAR(val1, val2, abs_error)
-
ASSERT_NO_FATAL_FAILURE(statement)
-
EXPECT_NO_FATAL_FAILURE(statement)
-
SCOPED_TRACE(message)
-
GTEST_TEST(test_suite_name, test_name)
-
TEST(test_suite_name, test_name)
-
TEST_F(test_fixture, test_name)
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
int RUN_ALL_TESTS () GTEST_MUST_USE_RESULT_
-
-
file
gtest_pred_impl.h - #include “gtest/gtest.h”
Defines
-
GTEST_ASSERT_(expression, on_failure)¶
-
GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)¶
-
GTEST_PRED1_(pred, v1, on_failure)¶
-
EXPECT_PRED_FORMAT1(pred_format, v1)¶
-
EXPECT_PRED1(pred, v1)¶
-
ASSERT_PRED_FORMAT1(pred_format, v1)¶
-
ASSERT_PRED1(pred, v1)¶
-
GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)¶
-
GTEST_PRED2_(pred, v1, v2, on_failure)¶
-
EXPECT_PRED_FORMAT2(pred_format, v1, v2)¶
-
EXPECT_PRED2(pred, v1, v2)¶
-
ASSERT_PRED_FORMAT2(pred_format, v1, v2)¶
-
ASSERT_PRED2(pred, v1, v2)¶
-
GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)¶
-
GTEST_PRED3_(pred, v1, v2, v3, on_failure)¶
-
EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3)¶
-
EXPECT_PRED3(pred, v1, v2, v3)¶
-
ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3)¶
-
ASSERT_PRED3(pred, v1, v2, v3)¶
-
GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)¶
-
GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)¶
-
EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4)¶
-
EXPECT_PRED4(pred, v1, v2, v3, v4)¶
-
ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4)¶
-
ASSERT_PRED4(pred, v1, v2, v3, v4)¶
-
GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)¶
-
GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)¶
-
EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5)¶
-
EXPECT_PRED5(pred, v1, v2, v3, v4, v5)¶
-
ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5)¶
-
ASSERT_PRED5(pred, v1, v2, v3, v4, v5)¶
-
-
file
gtest_pred_impl.h - #include “gtest/gtest.h”
Defines
-
GTEST_ASSERT_(expression, on_failure)
-
GTEST_PRED_FORMAT1_(pred_format, v1, on_failure)
-
GTEST_PRED1_(pred, v1, on_failure)
-
EXPECT_PRED_FORMAT1(pred_format, v1)
-
EXPECT_PRED1(pred, v1)
-
ASSERT_PRED_FORMAT1(pred_format, v1)
-
ASSERT_PRED1(pred, v1)
-
GTEST_PRED_FORMAT2_(pred_format, v1, v2, on_failure)
-
GTEST_PRED2_(pred, v1, v2, on_failure)
-
EXPECT_PRED_FORMAT2(pred_format, v1, v2)
-
EXPECT_PRED2(pred, v1, v2)
-
ASSERT_PRED_FORMAT2(pred_format, v1, v2)
-
ASSERT_PRED2(pred, v1, v2)
-
GTEST_PRED_FORMAT3_(pred_format, v1, v2, v3, on_failure)
-
GTEST_PRED3_(pred, v1, v2, v3, on_failure)
-
EXPECT_PRED_FORMAT3(pred_format, v1, v2, v3)
-
EXPECT_PRED3(pred, v1, v2, v3)
-
ASSERT_PRED_FORMAT3(pred_format, v1, v2, v3)
-
ASSERT_PRED3(pred, v1, v2, v3)
-
GTEST_PRED_FORMAT4_(pred_format, v1, v2, v3, v4, on_failure)
-
GTEST_PRED4_(pred, v1, v2, v3, v4, on_failure)
-
EXPECT_PRED_FORMAT4(pred_format, v1, v2, v3, v4)
-
EXPECT_PRED4(pred, v1, v2, v3, v4)
-
ASSERT_PRED_FORMAT4(pred_format, v1, v2, v3, v4)
-
ASSERT_PRED4(pred, v1, v2, v3, v4)
-
GTEST_PRED_FORMAT5_(pred_format, v1, v2, v3, v4, v5, on_failure)
-
GTEST_PRED5_(pred, v1, v2, v3, v4, v5, on_failure)
-
EXPECT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5)
-
EXPECT_PRED5(pred, v1, v2, v3, v4, v5)
-
ASSERT_PRED_FORMAT5(pred_format, v1, v2, v3, v4, v5)
-
ASSERT_PRED5(pred, v1, v2, v3, v4, v5)
-
-
file
gtest_prod.h Defines
-
FRIEND_TEST(test_case_name, test_name)¶
-
-
file
gtest_prod.h Defines
-
FRIEND_TEST(test_case_name, test_name)
-
-
file
attr.h - #include “cast.h”
Typedefs
-
using
is_call_guard= is_instantiation<call_guard, T>¶
-
using
extract_guard_t= typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type¶ Extract the
typefrom the firstcall_guardinExtras...(orvoid_typeif none found)
Functions
-
inline void
keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret)¶
-
template<typename ...
Extra, size_tnamed= constexpr_sum(std::is_base_of<arg, Extra>::value...), size_tself= constexpr_sum(std::is_same<is_method, Extra>::value...)>
constexpr boolexpected_num_args(size_t nargs, bool has_args, bool has_kwargs)¶ Check the number of named arguments at compile time.
-
using
-
file
attr.h - #include “cast.h”
Typedefs
-
using
is_call_guard= is_instantiation<call_guard, T>
-
using
extract_guard_t= typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type Extract the
typefrom the firstcall_guardinExtras...(orvoid_typeif none found)
Functions
-
inline void
keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret)
-
template<typename ...
Extra, size_tnamed= constexpr_sum(std::is_base_of<arg, Extra>::value...), size_tself= constexpr_sum(std::is_same<is_method, Extra>::value...)>
constexpr boolexpected_num_args(size_t nargs, bool has_args, bool has_kwargs) Check the number of named arguments at compile time.
-
using
-
file
buffer_info.h - #include “detail/common.h”
-
file
buffer_info.h - #include “detail/common.h”
-
file
cast.h - #include “pytypes.h”#include “detail/typeid.h”#include “detail/descr.h”#include “detail/internals.h”#include <array>#include <limits>#include <tuple>#include <type_traits>
Defines
-
PYBIND11_TYPE_CASTER(type, py_name)¶
-
PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type, ...)¶ Create a specialization for custom holder types (silently ignores std::shared_ptr)
-
PYBIND11_MAKE_OPAQUE(...)¶
-
PYBIND11_TYPE(...)¶ Lets you pass a type containing a
,through a macro parameter without needing a separate typedef, e.g.:
PYBIND11_OVERLOAD(PYBIND11_TYPE(ReturnType<A, B>), PYBIND11_TYPE(Parent<C, D>), f, arg)
Typedefs
-
using
cast_op_type= conditional_t<std::is_pointer<remove_reference_t<T>>::value, typename std::add_pointer<intrinsic_t<T>>::type, typename std::add_lvalue_reference<intrinsic_t<T>>::type>¶ Determine suitable casting operator for pointer-or-lvalue-casting type casters.
The type caster needs to provide
operator T*()andoperator T&()operators.If the type supports moving the value away via an
operator T&&() &&method, it should usemovable_cast_op_typeinstead.
-
using
movable_cast_op_type= conditional_t<std::is_pointer<typename std::remove_reference<T>::type>::value, typename std::add_pointer<intrinsic_t<T>>::type, conditional_t<std::is_rvalue_reference<T>::value, typename std::add_rvalue_reference<intrinsic_t<T>>::type, typename std::add_lvalue_reference<intrinsic_t<T>>::type>>¶ Determine suitable casting operator for a type caster with a movable value.
Such a type caster needs to provide
operator T*(),operator T&(), andoperator T&&() &&. The latter will be called in appropriate contexts where the value can be moved rather than copied.These operator are automatically provided when using the PYBIND11_TYPE_CASTER macro.
-
using
make_caster= type_caster<intrinsic_t<type>>¶
-
using
is_std_char_type= any_of<std::is_same<CharT, char>, std::is_same<CharT, char16_t>, std::is_same<CharT, char32_t>, std::is_same<CharT, wchar_t>>¶
-
using
type_caster_holder= conditional_t<is_copy_constructible<holder_type>::value, copyable_holder_caster<type, holder_type>, move_only_holder_caster<type, holder_type>>¶
-
using
move_is_plain_type= satisfies_none_of<T, std::is_void, std::is_pointer, std::is_reference, std::is_const>¶
-
using
move_never= none_of<move_always<T>, move_if_unreferenced<T>>¶
-
using
cast_is_temporary_value_reference= bool_constant<(std::is_reference<type>::value || std::is_pointer<type>::value) && !std::is_base_of<type_caster_generic, make_caster<type>>::value && !std::is_same<intrinsic_t<type>, void>::value>¶
-
using
overload_caster_t= conditional_t<cast_is_temporary_value_reference<ret_type>::value, make_caster<ret_type>, overload_unused>¶
Functions
-
inline std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache (PyTypeObject *type)
-
inline PYBIND11_NOINLINE void all_type_info_populate (PyTypeObject *t, std::vector< type_info *> &bases)
-
inline const std::vector<detail::type_info*> &
all_type_info(PyTypeObject *type)¶ Extracts vector of type_info pointers of pybind-registered roots of the given Python type.
Will be just 1 pybind type for the Python type of a pybind-registered class, or for any Python-side derived class that uses single inheritance. Will contain as many types as required for a Python class that uses multiple inheritance to inherit (directly or indirectly) from multiple pybind-registered classes. Will be empty if neither the type nor any base classes are pybind-registered.
The value is cached for the lifetime of the Python type.
-
inline PYBIND11_NOINLINE detail::type_info * get_type_info (PyTypeObject *type) Gets a single pybind11 type info for a python type.
Returns nullptr if neither the type nor any ancestors are pybind11-registered. Throws an exception if there are multiple basesuse
all_type_infoinstead if you want to support multiple bases.
-
inline detail::type_info *
get_local_type_info(const std::type_index &tp)¶
-
inline detail::type_info *
get_global_type_info(const std::type_index &tp)¶
-
inline PYBIND11_NOINLINE detail::type_info * get_type_info (const std::type_index &tp, bool throw_if_missing=false) Return the type info for a given C++ type; on lookup failure can either throw or return nullptr.
-
inline PYBIND11_NOINLINE handle get_type_handle (const std::type_info &tp, bool throw_if_missing)
-
inline PYBIND11_NOINLINE bool isinstance_generic (handle obj, const std::type_info &tp)
-
inline PYBIND11_NOINLINE std::string error_string ()
-
inline PYBIND11_NOINLINE handle get_object_handle (const void *ptr, const detail::type_info *type)
-
inline PyThreadState *
get_thread_state_unchecked()¶
-
inline PyObject *
make_new_instance(PyTypeObject *type)¶ Instance creation function for all pybind11 types.
It allocates the internal instance layout for holding C++ objects and holders. Allocation is done lazily (the first time the instance is cast to a reference or pointer), and initialization is done by an
__init__function.
-
template<typename
T>
make_caster<T>::template cast_op_type<T>cast_op(make_caster<T> &caster)¶
-
template<typename
T>
make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>cast_op(make_caster<T> &&caster)¶
-
template<typename
T, typenameSFINAE>
type_caster<T, SFINAE> &load_type(type_caster<T, SFINAE> &conv, const handle &handle)¶
-
template<typename
T>
make_caster<T>load_type(const handle &handle)¶
-
template<typename
T, detail::enable_if_t<!detail::is_pyobject<T>::value, int> = 0>
Tcast(const handle &handle)¶
-
template<typename
T, detail::enable_if_t<!detail::is_pyobject<T>::value, int> = 0>
objectcast(const T &value, return_value_policy policy = return_value_policy::automatic_reference, handle parent = handle())¶
-
template<typename
T>
detail::enable_if_t<detail::move_if_unreferenced<T>::value, T>cast(object &&object)¶
-
template<typename
T, enable_if_t<!is_pyobject<T>::value, int>>
objectobject_or_cast(T &&o)¶
-
template<typename
T>
enable_if_t<cast_is_temporary_value_reference<T>::value, T>cast_ref(object &&o, make_caster<T> &caster)¶
-
template<typename
T>
enable_if_t<!cast_is_temporary_value_reference<T>::value, T>cast_ref(object&&, overload_unused&)¶
-
template<typename
T>
enable_if_t<!cast_is_temporary_value_reference<T>::value, T>cast_safe(object &&o)¶
-
template<typename
T>
enable_if_t<cast_is_temporary_value_reference<T>::value, T>cast_safe(object&&)¶
-
template<return_value_policy
policy= return_value_policy::automatic_reference>
tuplemake_tuple()¶
-
template<return_value_policy
policy= return_value_policy::automatic_reference, typename ...Args>
tuplemake_tuple(Args&&... args_)¶
-
template<return_value_policy
policy, typename ...Args, typename = enable_if_t<all_of<is_positional<Args>...>::value>>
simple_collector<policy>collect_arguments(Args&&... args)¶ Collect only positional arguments for a Python function call.
-
template<return_value_policy
policy, typename ...Args, typename = enable_if_t<!all_of<is_positional<Args>...>::value>>
unpacking_collector<policy>collect_arguments(Args&&... args)¶ Collect all arguments, including keywords and unpacking (only instantiated when needed)
-
-
file
cast.h - #include “pytypes.h”#include “detail/typeid.h”#include “detail/descr.h”#include “detail/internals.h”#include <array>#include <limits>#include <tuple>#include <type_traits>
Defines
-
PYBIND11_TYPE_CASTER(type, py_name)
-
PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type, ...) Create a specialization for custom holder types (silently ignores std::shared_ptr)
-
PYBIND11_MAKE_OPAQUE(...)
-
PYBIND11_TYPE(...) Lets you pass a type containing a
,through a macro parameter without needing a separate typedef, e.g.:
PYBIND11_OVERLOAD(PYBIND11_TYPE(ReturnType<A, B>), PYBIND11_TYPE(Parent<C, D>), f, arg)
Typedefs
-
using
cast_op_type= conditional_t<std::is_pointer<remove_reference_t<T>>::value, typename std::add_pointer<intrinsic_t<T>>::type, typename std::add_lvalue_reference<intrinsic_t<T>>::type> Determine suitable casting operator for pointer-or-lvalue-casting type casters.
The type caster needs to provide
operator T*()andoperator T&()operators.If the type supports moving the value away via an
operator T&&() &&method, it should usemovable_cast_op_typeinstead.
-
using
movable_cast_op_type= conditional_t<std::is_pointer<typename std::remove_reference<T>::type>::value, typename std::add_pointer<intrinsic_t<T>>::type, conditional_t<std::is_rvalue_reference<T>::value, typename std::add_rvalue_reference<intrinsic_t<T>>::type, typename std::add_lvalue_reference<intrinsic_t<T>>::type>> Determine suitable casting operator for a type caster with a movable value.
Such a type caster needs to provide
operator T*(),operator T&(), andoperator T&&() &&. The latter will be called in appropriate contexts where the value can be moved rather than copied.These operator are automatically provided when using the PYBIND11_TYPE_CASTER macro.
-
using
make_caster= type_caster<intrinsic_t<type>>
-
using
is_std_char_type= any_of<std::is_same<CharT, char>, std::is_same<CharT, char16_t>, std::is_same<CharT, char32_t>, std::is_same<CharT, wchar_t>>
-
using
type_caster_holder= conditional_t<is_copy_constructible<holder_type>::value, copyable_holder_caster<type, holder_type>, move_only_holder_caster<type, holder_type>>
-
using
move_is_plain_type= satisfies_none_of<T, std::is_void, std::is_pointer, std::is_reference, std::is_const>
-
using
move_never= none_of<move_always<T>, move_if_unreferenced<T>>
-
using
cast_is_temporary_value_reference= bool_constant<(std::is_reference<type>::value || std::is_pointer<type>::value) && !std::is_base_of<type_caster_generic, make_caster<type>>::value && !std::is_same<intrinsic_t<type>, void>::value>
-
using
overload_caster_t= conditional_t<cast_is_temporary_value_reference<ret_type>::value, make_caster<ret_type>, overload_unused>
-
using
arg_t= arg_v Alias for backward compatibility to be removed in version 2.0.
Functions
-
inline std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache (PyTypeObject *type)
-
inline PYBIND11_NOINLINE void all_type_info_populate (PyTypeObject *t, std::vector< type_info *> &bases)
-
inline const std::vector<detail::type_info*> &
all_type_info(PyTypeObject *type) Extracts vector of type_info pointers of pybind-registered roots of the given Python type.
Will be just 1 pybind type for the Python type of a pybind-registered class, or for any Python-side derived class that uses single inheritance. Will contain as many types as required for a Python class that uses multiple inheritance to inherit (directly or indirectly) from multiple pybind-registered classes. Will be empty if neither the type nor any base classes are pybind-registered.
The value is cached for the lifetime of the Python type.
-
inline PYBIND11_NOINLINE detail::type_info * get_type_info (PyTypeObject *type) Gets a single pybind11 type info for a python type.
Returns nullptr if neither the type nor any ancestors are pybind11-registered. Throws an exception if there are multiple basesuse
all_type_infoinstead if you want to support multiple bases.
-
inline detail::type_info *
get_local_type_info(const std::type_index &tp)
-
inline detail::type_info *
get_global_type_info(const std::type_index &tp)
-
inline PYBIND11_NOINLINE detail::type_info * get_type_info (const std::type_index &tp, bool throw_if_missing=false) Return the type info for a given C++ type; on lookup failure can either throw or return nullptr.
-
inline PYBIND11_NOINLINE handle get_type_handle (const std::type_info &tp, bool throw_if_missing)
-
inline PYBIND11_NOINLINE bool isinstance_generic (handle obj, const std::type_info &tp)
-
inline PYBIND11_NOINLINE std::string error_string ()
-
inline PYBIND11_NOINLINE handle get_object_handle (const void *ptr, const detail::type_info *type)
-
inline PyThreadState *
get_thread_state_unchecked()
-
inline PyObject *
make_new_instance(PyTypeObject *type) Instance creation function for all pybind11 types.
It allocates the internal instance layout for holding C++ objects and holders. Allocation is done lazily (the first time the instance is cast to a reference or pointer), and initialization is done by an
__init__function.
-
template<typename
T>
make_caster<T>::template cast_op_type<T>cast_op(make_caster<T> &caster)
-
template<typename
T>
make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>cast_op(make_caster<T> &&caster)
-
template<typename
T, typenameSFINAE>
type_caster<T, SFINAE> &load_type(type_caster<T, SFINAE> &conv, const handle &handle)
-
template<typename
T>
make_caster<T>load_type(const handle &handle)
-
template<typename
T, detail::enable_if_t<!detail::is_pyobject<T>::value, int> = 0>
Tcast(const handle &handle)
-
template<typename
T, detail::enable_if_t<!detail::is_pyobject<T>::value, int> = 0>
objectcast(const T &value, return_value_policy policy = return_value_policy::automatic_reference, handle parent = handle())
-
template<typename
T>
detail::enable_if_t<detail::move_if_unreferenced<T>::value, T>cast(object &&object)
-
template<typename
T, enable_if_t<!is_pyobject<T>::value, int>>
objectobject_or_cast(T &&o)
-
template<typename
T>
enable_if_t<cast_is_temporary_value_reference<T>::value, T>cast_ref(object &&o, make_caster<T> &caster)
-
template<typename
T>
enable_if_t<!cast_is_temporary_value_reference<T>::value, T>cast_ref(object&&, overload_unused&)
-
template<typename
T>
enable_if_t<!cast_is_temporary_value_reference<T>::value, T>cast_safe(object &&o)
-
template<typename
T>
enable_if_t<cast_is_temporary_value_reference<T>::value, T>cast_safe(object&&)
-
template<>
inline voidcast_safe<void>(object&&)
-
template<return_value_policy
policy= return_value_policy::automatic_reference>
tuplemake_tuple()
-
template<return_value_policy
policy= return_value_policy::automatic_reference, typename ...Args>
tuplemake_tuple(Args&&... args_)
-
template<return_value_policy
policy, typename ...Args, typename = enable_if_t<all_of<is_positional<Args>...>::value>>
simple_collector<policy>collect_arguments(Args&&... args) Collect only positional arguments for a Python function call.
-
template<return_value_policy
policy, typename ...Args, typename = enable_if_t<!all_of<is_positional<Args>...>::value>>
unpacking_collector<policy>collect_arguments(Args&&... args) Collect all arguments, including keywords and unpacking (only instantiated when needed)
-
-
file
chrono.h - #include “pybind11.h”#include <cmath>#include <ctime>#include <chrono>#include <datetime.h>
-
file
chrono.h - #include “pybind11.h”#include <cmath>#include <ctime>#include <chrono>#include <datetime.h>
Defines
-
PyDateTime_DELTA_GET_DAYS(o)
-
PyDateTime_DELTA_GET_SECONDS(o)
-
PyDateTime_DELTA_GET_MICROSECONDS(o)
-
-
file
common.h - #include “detail/common.h”
-
file
common.h - #include <Python.h>#include <frameobject.h>#include <pythread.h>#include <cstddef>#include <cstring>#include <forward_list>#include <vector>#include <string>#include <stdexcept>#include <unordered_set>#include <unordered_map>#include <memory>#include <typeindex>#include <type_traits>
Defines
-
NAMESPACE_BEGIN(name)¶
-
NAMESPACE_END(name)¶
-
PYBIND11_NAMESPACE¶
-
PYBIND11_EXPORT¶
-
PYBIND11_NOINLINE¶
-
PYBIND11_DEPRECATED(reason)¶
-
PYBIND11_VERSION_MAJOR¶
-
PYBIND11_VERSION_MINOR¶
-
PYBIND11_VERSION_PATCH¶
-
PYBIND11_INSTANCE_METHOD_NEW(ptr, class_)¶ Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Compatibility macros for various Python versions
-
PYBIND11_INSTANCE_METHOD_CHECK¶
-
PYBIND11_INSTANCE_METHOD_GET_FUNCTION¶
-
PYBIND11_BYTES_CHECK¶
-
PYBIND11_BYTES_FROM_STRING¶
-
PYBIND11_BYTES_FROM_STRING_AND_SIZE¶
-
PYBIND11_BYTES_AS_STRING_AND_SIZE¶
-
PYBIND11_BYTES_AS_STRING¶
-
PYBIND11_BYTES_SIZE¶
-
PYBIND11_LONG_CHECK(o)¶
-
PYBIND11_LONG_AS_LONGLONG(o)¶
-
PYBIND11_LONG_FROM_SIGNED(o)¶
-
PYBIND11_LONG_FROM_UNSIGNED(o)¶
-
PYBIND11_BYTES_NAME¶
-
PYBIND11_STRING_NAME¶
-
PYBIND11_SLICE_OBJECT¶
-
PYBIND11_FROM_STRING¶
-
PYBIND11_STR_TYPE¶
-
PYBIND11_BOOL_ATTR¶
-
PYBIND11_NB_BOOL(ptr)¶
-
PYBIND11_PLUGIN_IMPL(name)¶
-
PYBIND11_TRY_NEXT_OVERLOAD¶
-
PYBIND11_STRINGIFY(x)¶
-
PYBIND11_TOSTRING(x)¶
-
PYBIND11_CONCAT(first, second)¶
-
PYBIND11_ENSURE_INTERNALS_READY¶
-
PYBIND11_CHECK_PYTHON_VERSION¶
-
PYBIND11_CATCH_INIT_EXCEPTIONS¶
-
PYBIND11_PLUGIN(name)¶ Deprecated in favor of PYBIND11_MODULE***
This macro creates the entry point that will be invoked when the Python interpreter imports a plugin library. Please create a
modulein the function body and return the pointer to its underlying Python object at the end... code-block:: cpp
/ Set up bindings here return m.ptr(); }PYBIND11_PLUGIN(example) { pybind11::module m("example", "pybind11 example plugin");
-
PYBIND11_MODULE(name, variable)¶ This macro creates the entry point that will be invoked when the Python interpreter imports an extension module.
The module name is given as the fist argument and it should not be in quotes. The second macro argument defines a variable of type
py::modulewhich can be used to initialize the module... code-block:: cpp
PYBIND11_MODULE(example, m) { m.doc() = "pybind11 example module";
Add bindings here m.def(“foo”, []() { return “Hello, World!”; }); }
-
PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN)¶
-
PYBIND11_RUNTIME_EXCEPTION(name, type)¶
Typedefs
-
using
ssize_t= Py_ssize_t¶
-
using
size_t= std::size_t¶
-
using
enable_if_t= typename std::enable_if<B, T>::type¶ from cpp_future import (convenient aliases from C++14/17)
-
using
conditional_t= typename std::conditional<B, T, F>::type¶
-
using
remove_cv_t= typename std::remove_cv<T>::type¶
-
using
remove_reference_t= typename std::remove_reference<T>::type¶
-
using
make_index_sequence= typename make_index_sequence_impl<N>::type¶
-
using
select_indices= typename select_indices_impl<index_sequence<>, 0, Bs...>::type¶
-
using
bool_constant= std::integral_constant<bool, B>¶ Backports of std::bool_constant and std::negation to accommodate older compilers.
-
using
void_t= typename void_t_impl<Ts...>::type¶
-
using
intrinsic_t= typename intrinsic_type<T>::type¶
-
using
exactly_one_t= typename exactly_one<Predicate, Default, Ts...>::type¶
-
using
deferred_t= typename deferred_type<T, Us...>::type¶
-
using
is_strict_base_of= bool_constant<std::is_base_of<Base, Derived>::value && !std::is_same<Base, Derived>::value>¶ Like is_base_of, but requires a strict base (i.e.
is_strict_base_of<T, T>value == false, unlikestd::is_base_of)
-
using
is_accessible_base_of= bool_constant<std::is_base_of<Base, Derived>::value && std::is_convertible<Derived*, Base*>::value>¶ Like is_base_of, but also requires that the base type is accessible (i.e.
that a Derived pointer can be converted to a Base pointer)
-
using
is_template_base_of= decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T>*)nullptr))¶ Check if a template is the base of a type.
For example:
is_template_base_of<Base, T>is true ifstruct T : Base<U> {}where U can be anything
Check if T is std::shared_ptr<U> where U can be anything.
-
using
is_function_pointer= bool_constant<std::is_pointer<T>::value && std::is_function<typename std::remove_pointer<T>::type>::value>¶
-
using
function_signature_t= conditional_t<std::is_function<F>::value, F, typename conditional_t<std::is_pointer<F>::value || std::is_member_pointer<F>::value, std::remove_pointer<F>, strip_function_object<F>>::type>¶
-
using
is_lambda= satisfies_none_of<remove_reference_t<T>, std::is_function, std::is_pointer, std::is_member_pointer>¶ Returns true if the type looks like a lambda: that is, isn’t a function, pointer or member pointer.
Note that this can catch all sorts of other things, too; this is intended to be used in a place where passing a lambda makes sense.
-
using
expand_side_effects= bool[]¶ Apply a function over each element of a parameter pack.
Enums
-
enum
return_value_policy¶ Approach used to cast a previously unknown C++ instance into a Python object.
Values:
-
enumerator
automatic¶ This is the default return value policy, which falls back to the policy return_value_policy::take_ownership when the return value is a pointer.
Otherwise, it uses return_value::move or return_value::copy for rvalue and lvalue references, respectively. See below for a description of what all of these different policies do.
-
enumerator
automatic_reference¶ As above, but use policy return_value_policy::reference when the return value is a pointer.
This is the default conversion policy for function arguments when calling Python functions manually from C++ code (i.e. via handle::operator()). You probably won’t need to use this.
-
enumerator
take_ownership¶ Reference an existing object (i.e.
do not create a new copy) and take ownership. Python will call the destructor and delete operator when the object’s reference count reaches zero. Undefined behavior ensues when the C++ side does the same..
-
enumerator
copy¶ Create a new copy of the returned object, which will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances are decoupled.
-
enumerator
move¶ Use std::move to move the return value contents into a new instance that will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances (move source and destination) are decoupled.
-
enumerator
reference¶ Reference an existing object, but do not take ownership.
The C++ side is responsible for managing the object’s lifetime and deallocating it when it is no longer used. Warning: undefined behavior will ensue when the C++ side deletes an object that is still referenced and used by Python.
-
enumerator
reference_internal¶ This policy only applies to methods and properties.
It references the object without taking ownership similar to the above return_value_policy::reference policy. In contrast to that policy, the function or property’s implicit this argument (called the parent) is considered to be the the owner of the return value (the child). pybind11 then couples the lifetime of the parent to the child via a reference relationship that ensures that the parent cannot be garbage collected while Python is still using the child. More advanced variations of this scheme are also possible using combinations of return_value_policy::reference and the keep_alive call policy
-
enumerator
automatic This is the default return value policy, which falls back to the policy return_value_policy::take_ownership when the return value is a pointer.
Otherwise, it uses return_value::move or return_value::copy for rvalue and lvalue references, respectively. See below for a description of what all of these different policies do.
-
enumerator
automatic_reference As above, but use policy return_value_policy::reference when the return value is a pointer.
This is the default conversion policy for function arguments when calling Python functions manually from C++ code (i.e. via handle::operator()). You probably won’t need to use this.
-
enumerator
take_ownership Reference an existing object (i.e.
do not create a new copy) and take ownership. Python will call the destructor and delete operator when the object’s reference count reaches zero. Undefined behavior ensues when the C++ side does the same..
-
enumerator
copy Create a new copy of the returned object, which will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances are decoupled.
-
enumerator
move Use std::move to move the return value contents into a new instance that will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances (move source and destination) are decoupled.
-
enumerator
reference Reference an existing object, but do not take ownership.
The C++ side is responsible for managing the object’s lifetime and deallocating it when it is no longer used. Warning: undefined behavior will ensue when the C++ side deletes an object that is still referenced and used by Python.
-
enumerator
reference_internal This policy only applies to methods and properties.
It references the object without taking ownership similar to the above return_value_policy::reference policy. In contrast to that policy, the function or property’s implicit this argument (called the parent) is considered to be the the owner of the return value (the child). pybind11 then couples the lifetime of the parent to the child via a reference relationship that ensures that the parent cannot be garbage collected while Python is still using the child. More advanced variations of this scheme are also possible using combinations of return_value_policy::reference and the keep_alive call policy
-
enumerator
Functions
-
constexpr size_t
instance_simple_holder_in_ptrs()¶ The space to allocate for simple layout instance holders (see below) in multiple of the size of a pointer (e.g.
2 means 16 bytes on 64-bit architectures). The default is the minimum required to holder either a std::unique_ptr or std::shared_ptr (which is almost always sizeof(std::shared_ptr<T>)).
-
constexpr int
first(int i)¶ Implementation details for constexpr functions.
-
constexpr int
last(int, int result)¶
-
template<template<typename> class
Predicate, typename ...Ts>
constexpr intconstexpr_first()¶ Return the index of the first type in Ts which satisfies Predicate<T>.
Returns sizeof…(Ts) if none match.
-
template<template<typename> class
Predicate, typename ...Ts>
constexpr intconstexpr_last()¶ Return the index of the last type in Ts which satisfies Predicate<T>, or -1 if none match.
-
inline void
ignore_unused(const int*)¶ Ignore that a variable is unused in compiler warnings.
-
PYBIND11_RUNTIME_EXCEPTION (cast_error, PyExc_RuntimeError) PYBIND11_RUNTIME_EXCEPTION(reference_cast_error Thrown when pybind11::cast or handle::call fail due to a type casting error.
-
inline PyExc_RuntimeError [[noreturn]] PYBIND11_NOINLINE void pybind11_fail (const char *reason) Used internally.
-
inline PYBIND11_NOINLINE void pybind11_fail (const std::string &reason)
Variables
-
static constexpr auto
const_= std::true_type{}¶ Const member function selector for overload_cast.
regular: static_cast<Return (Class::*)(Arg) const>(&Class::func)
sweet: overload_cast<Arg>(&Class::func, const_)
-
-
file
common.h - #include “detail/common.h”
-
file
common.h - #include <Python.h>#include <frameobject.h>#include <pythread.h>#include <cstddef>#include <cstring>#include <forward_list>#include <vector>#include <string>#include <stdexcept>#include <unordered_set>#include <unordered_map>#include <memory>#include <typeindex>#include <type_traits>
Defines
-
NAMESPACE_BEGIN(name)
-
NAMESPACE_END(name)
-
PYBIND11_NAMESPACE
-
PYBIND11_EXPORT
-
PYBIND11_NOINLINE
-
PYBIND11_DEPRECATED(reason)
-
PYBIND11_VERSION_MAJOR
-
PYBIND11_VERSION_MINOR
-
PYBIND11_VERSION_PATCH
-
PYBIND11_INSTANCE_METHOD_NEW(ptr, class_) Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Compatibility macros for various Python versions
-
PYBIND11_INSTANCE_METHOD_CHECK
-
PYBIND11_INSTANCE_METHOD_GET_FUNCTION
-
PYBIND11_BYTES_CHECK
-
PYBIND11_BYTES_FROM_STRING
-
PYBIND11_BYTES_FROM_STRING_AND_SIZE
-
PYBIND11_BYTES_AS_STRING_AND_SIZE
-
PYBIND11_BYTES_AS_STRING
-
PYBIND11_BYTES_SIZE
-
PYBIND11_LONG_CHECK(o)
-
PYBIND11_LONG_AS_LONGLONG(o)
-
PYBIND11_LONG_FROM_SIGNED(o)
-
PYBIND11_LONG_FROM_UNSIGNED(o)
-
PYBIND11_BYTES_NAME
-
PYBIND11_STRING_NAME
-
PYBIND11_SLICE_OBJECT
-
PYBIND11_FROM_STRING
-
PYBIND11_STR_TYPE
-
PYBIND11_BOOL_ATTR
-
PYBIND11_NB_BOOL(ptr)
-
PYBIND11_PLUGIN_IMPL(name)
-
PYBIND11_TRY_NEXT_OVERLOAD
-
PYBIND11_STRINGIFY(x)
-
PYBIND11_TOSTRING(x)
-
PYBIND11_CONCAT(first, second)
-
PYBIND11_ENSURE_INTERNALS_READY
-
PYBIND11_CHECK_PYTHON_VERSION
-
PYBIND11_CATCH_INIT_EXCEPTIONS
-
PYBIND11_PLUGIN(name) Deprecated in favor of PYBIND11_MODULE***
This macro creates the entry point that will be invoked when the Python interpreter imports a plugin library. Please create a
modulein the function body and return the pointer to its underlying Python object at the end... code-block:: cpp
/ Set up bindings here return m.ptr(); }PYBIND11_PLUGIN(example) { pybind11::module m("example", "pybind11 example plugin");
-
PYBIND11_MODULE(name, variable) This macro creates the entry point that will be invoked when the Python interpreter imports an extension module.
The module name is given as the fist argument and it should not be in quotes. The second macro argument defines a variable of type
py::modulewhich can be used to initialize the module... code-block:: cpp
PYBIND11_MODULE(example, m) { m.doc() = "pybind11 example module";
Add bindings here m.def(“foo”, []() { return “Hello, World!”; }); }
-
PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN)
-
PYBIND11_RUNTIME_EXCEPTION(name, type)
Typedefs
-
using
ssize_t= Py_ssize_t
-
using
size_t= std::size_t
-
using
enable_if_t= typename std::enable_if<B, T>::type from cpp_future import (convenient aliases from C++14/17)
-
using
conditional_t= typename std::conditional<B, T, F>::type
-
using
remove_cv_t= typename std::remove_cv<T>::type
-
using
remove_reference_t= typename std::remove_reference<T>::type
-
using
make_index_sequence= typename make_index_sequence_impl<N>::type
-
using
select_indices= typename select_indices_impl<index_sequence<>, 0, Bs...>::type
-
using
bool_constant= std::integral_constant<bool, B> Backports of std::bool_constant and std::negation to accommodate older compilers.
-
using
void_t= typename void_t_impl<Ts...>::type
-
using
satisfies_all_of= all_of<Predicates<T>...>
-
using
satisfies_any_of= any_of<Predicates<T>...>
-
using
satisfies_none_of= none_of<Predicates<T>...>
-
using
intrinsic_t= typename intrinsic_type<T>::type
-
using
exactly_one_t= typename exactly_one<Predicate, Default, Ts...>::type
-
using
deferred_t= typename deferred_type<T, Us...>::type
-
using
is_strict_base_of= bool_constant<std::is_base_of<Base, Derived>::value && !std::is_same<Base, Derived>::value> Like is_base_of, but requires a strict base (i.e.
is_strict_base_of<T, T>value == false, unlikestd::is_base_of)
-
using
is_accessible_base_of= bool_constant<std::is_base_of<Base, Derived>::value && std::is_convertible<Derived*, Base*>::value> Like is_base_of, but also requires that the base type is accessible (i.e.
that a Derived pointer can be converted to a Base pointer)
-
using
is_template_base_of= decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T>*)nullptr)) Check if a template is the base of a type.
For example:
is_template_base_of<Base, T>is true ifstruct T : Base<U> {}where U can be anything
-
using
is_shared_ptr= is_instantiation<std::shared_ptr, T> Check if T is std::shared_ptr<U> where U can be anything.
-
using
is_function_pointer= bool_constant<std::is_pointer<T>::value && std::is_function<typename std::remove_pointer<T>::type>::value>
-
using
function_signature_t= conditional_t<std::is_function<F>::value, F, typename conditional_t<std::is_pointer<F>::value || std::is_member_pointer<F>::value, std::remove_pointer<F>, strip_function_object<F>>::type>
-
using
is_lambda= satisfies_none_of<remove_reference_t<T>, std::is_function, std::is_pointer, std::is_member_pointer> Returns true if the type looks like a lambda: that is, isn’t a function, pointer or member pointer.
Note that this can catch all sorts of other things, too; this is intended to be used in a place where passing a lambda makes sense.
-
using
expand_side_effects= bool[] Apply a function over each element of a parameter pack.
Enums
-
enum
return_value_policy Approach used to cast a previously unknown C++ instance into a Python object.
Values:
-
enumerator
automatic This is the default return value policy, which falls back to the policy return_value_policy::take_ownership when the return value is a pointer.
Otherwise, it uses return_value::move or return_value::copy for rvalue and lvalue references, respectively. See below for a description of what all of these different policies do.
-
enumerator
automatic_reference As above, but use policy return_value_policy::reference when the return value is a pointer.
This is the default conversion policy for function arguments when calling Python functions manually from C++ code (i.e. via handle::operator()). You probably won’t need to use this.
-
enumerator
take_ownership Reference an existing object (i.e.
do not create a new copy) and take ownership. Python will call the destructor and delete operator when the object’s reference count reaches zero. Undefined behavior ensues when the C++ side does the same..
-
enumerator
copy Create a new copy of the returned object, which will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances are decoupled.
-
enumerator
move Use std::move to move the return value contents into a new instance that will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances (move source and destination) are decoupled.
-
enumerator
reference Reference an existing object, but do not take ownership.
The C++ side is responsible for managing the object’s lifetime and deallocating it when it is no longer used. Warning: undefined behavior will ensue when the C++ side deletes an object that is still referenced and used by Python.
-
enumerator
reference_internal This policy only applies to methods and properties.
It references the object without taking ownership similar to the above return_value_policy::reference policy. In contrast to that policy, the function or property’s implicit this argument (called the parent) is considered to be the the owner of the return value (the child). pybind11 then couples the lifetime of the parent to the child via a reference relationship that ensures that the parent cannot be garbage collected while Python is still using the child. More advanced variations of this scheme are also possible using combinations of return_value_policy::reference and the keep_alive call policy
-
enumerator
automatic This is the default return value policy, which falls back to the policy return_value_policy::take_ownership when the return value is a pointer.
Otherwise, it uses return_value::move or return_value::copy for rvalue and lvalue references, respectively. See below for a description of what all of these different policies do.
-
enumerator
automatic_reference As above, but use policy return_value_policy::reference when the return value is a pointer.
This is the default conversion policy for function arguments when calling Python functions manually from C++ code (i.e. via handle::operator()). You probably won’t need to use this.
-
enumerator
take_ownership Reference an existing object (i.e.
do not create a new copy) and take ownership. Python will call the destructor and delete operator when the object’s reference count reaches zero. Undefined behavior ensues when the C++ side does the same..
-
enumerator
copy Create a new copy of the returned object, which will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances are decoupled.
-
enumerator
move Use std::move to move the return value contents into a new instance that will be owned by Python.
This policy is comparably safe because the lifetimes of the two instances (move source and destination) are decoupled.
-
enumerator
reference Reference an existing object, but do not take ownership.
The C++ side is responsible for managing the object’s lifetime and deallocating it when it is no longer used. Warning: undefined behavior will ensue when the C++ side deletes an object that is still referenced and used by Python.
-
enumerator
reference_internal This policy only applies to methods and properties.
It references the object without taking ownership similar to the above return_value_policy::reference policy. In contrast to that policy, the function or property’s implicit this argument (called the parent) is considered to be the the owner of the return value (the child). pybind11 then couples the lifetime of the parent to the child via a reference relationship that ensures that the parent cannot be garbage collected while Python is still using the child. More advanced variations of this scheme are also possible using combinations of return_value_policy::reference and the keep_alive call policy
-
enumerator
Functions
-
static inline constexpr int
log2(size_t n, int k = 0)
-
constexpr size_t
instance_simple_holder_in_ptrs() The space to allocate for simple layout instance holders (see below) in multiple of the size of a pointer (e.g.
2 means 16 bytes on 64-bit architectures). The default is the minimum required to holder either a std::unique_ptr or std::shared_ptr (which is almost always sizeof(std::shared_ptr<T>)).
-
constexpr size_t
constexpr_sum() Compile-time integer sum.
-
constexpr int
first(int i) Implementation details for constexpr functions.
-
constexpr int
last(int, int result)
-
template<template<typename> class
Predicate, typename ...Ts>
constexpr intconstexpr_first() Return the index of the first type in Ts which satisfies Predicate<T>.
Returns sizeof…(Ts) if none match.
-
template<template<typename> class
Predicate, typename ...Ts>
constexpr intconstexpr_last() Return the index of the last type in Ts which satisfies Predicate<T>, or -1 if none match.
-
inline void
ignore_unused(const int*) Ignore that a variable is unused in compiler warnings.
-
PYBIND11_RUNTIME_EXCEPTION (cast_error, PyExc_RuntimeError) PYBIND11_RUNTIME_EXCEPTION(reference_cast_error Thrown when pybind11::cast or handle::call fail due to a type casting error.
-
inline PyExc_RuntimeError [[noreturn]] PYBIND11_NOINLINE void pybind11_fail (const char *reason) Used internally.
-
inline PYBIND11_NOINLINE void pybind11_fail (const std::string &reason)
Variables
-
static constexpr auto
const_= std::true_type{} Const member function selector for overload_cast.
regular: static_cast<Return (Class::*)(Arg) const>(&Class::func)
sweet: overload_cast<Arg>(&Class::func, const_)
-
-
file
complex.h - #include “pybind11.h”#include <complex>
-
file
complex.h - #include “pybind11.h”#include <complex>
-
file
class.h - #include “../attr.h”#include “../options.h”
Defines
-
PYBIND11_SET_OLDPY_QUALNAME(obj, nameobj)¶
Functions
-
inline PyTypeObject *
type_incref(PyTypeObject *type)¶
-
inline PyObject *
pybind11_static_get(PyObject *self, PyObject*, PyObject *cls)¶ pybind11_static_property.__get__(): Always pass the class instead of the instance.
-
inline int
pybind11_static_set(PyObject *self, PyObject *obj, PyObject *value)¶ pybind11_static_property.__set__(): Just like the above__get__().
-
inline PyTypeObject *
make_static_property_type()¶ A
static_propertyis the same as apropertybut the__get__()and__set__()methods are modified to always use the object type instead of a concrete instance.Return value: New reference.
-
inline int
pybind11_meta_setattro(PyObject *obj, PyObject *name, PyObject *value)¶ Types with static properties need to handle
Type.static_prop = xin a specific way.By default, Python replaces the
static_propertyitself, but for wrapped C++ types we need to callstatic_property.__set__()in order to propagate the new value to the underlying C++ data structure.
-
inline PyTypeObject *
make_default_metaclass()¶ This metaclass is assigned by default to all pybind11 types and is required in order for static properties to function correctly.
Users may override this using
py::metaclass. Return value: New reference.
-
inline void
traverse_offset_bases(void *valueptr, const detail::type_info *tinfo, instance *self, bool (*f)(void*, instance*))¶ For multiple inheritance types we need to recursively register/deregister base pointers for any base classes with pointers that are difference from the instance value pointer so that we can correctly recognize an offset base class pointer.
This calls a function with any offset base ptrs.
-
inline PyObject *
make_new_instance(PyTypeObject *type) Instance creation function for all pybind11 types.
It allocates the internal instance layout for holding C++ objects and holders. Allocation is done lazily (the first time the instance is cast to a reference or pointer), and initialization is done by an
__init__function.
-
inline PyObject *
pybind11_object_new(PyTypeObject *type, PyObject*, PyObject*)¶ Instance creation function for all pybind11 types.
It only allocates space for the C++ object, but doesn’t call the constructor an
__init__function must do that.
-
inline int
pybind11_object_init(PyObject *self, PyObject*, PyObject*)¶ An
__init__function constructs the C++ object.Users should provide at least one of these using
py::initor directly with.def(__init__, ...). Otherwise, the following default function will be used which simply throws an exception.
-
inline void
add_patient(PyObject *nurse, PyObject *patient)¶
-
inline void
clear_patients(PyObject *self)¶
-
inline void
clear_instance(PyObject *self)¶ Clears all internal data from the instance and removes it from registered instances in preparation for deallocation.
-
inline void
pybind11_object_dealloc(PyObject *self)¶ Instance destructor function for all pybind11 types.
It calls
type_info.deallocto destroy the C++ object itself, while the rest is Python bookkeeping.
-
inline PyObject *
make_object_base_type(PyTypeObject *metaclass)¶ Create the type which can be used as a common base for all classes.
This is needed in order to satisfy Python’s requirements for multiple inheritance. Return value: New reference.
-
inline PyObject *
pybind11_get_dict(PyObject *self, void*)¶ dynamic_attr: Support for
d = instance.__dict__.
-
inline int
pybind11_set_dict(PyObject *self, PyObject *new_dict, void*)¶ dynamic_attr: Support for
instance.__dict__ = dict().
-
inline int
pybind11_traverse(PyObject *self, visitproc visit, void *arg)¶ dynamic_attr: Allow the garbage collector to traverse the internal instance
__dict__.
-
inline int
pybind11_clear(PyObject *self)¶ dynamic_attr: Allow the GC to clear the dictionary.
-
inline void
enable_dynamic_attributes(PyHeapTypeObject *heap_type)¶ Give instances of this type a
__dict__and opt into garbage collection.
-
inline int
pybind11_getbuffer(PyObject *obj, Py_buffer *view, int flags)¶ buffer_protocol: Fill in the view as specified by flags.
-
inline void
pybind11_releasebuffer(PyObject*, Py_buffer *view)¶ buffer_protocol: Release the resources of the buffer.
-
inline void
enable_buffer_protocol(PyHeapTypeObject *heap_type)¶ Give this type a buffer interface.
-
inline PyObject *
make_new_python_type(const type_record &rec)¶ Create a brand new Python type according to the
type_recordspecification.Return value: New reference.
-
-
file
class.h - #include “../attr.h”#include “../options.h”
Defines
-
PYBIND11_SET_OLDPY_QUALNAME(obj, nameobj)
Functions
-
inline PyTypeObject *
type_incref(PyTypeObject *type)
-
inline PyObject *
pybind11_static_get(PyObject *self, PyObject*, PyObject *cls) pybind11_static_property.__get__(): Always pass the class instead of the instance.
-
inline int
pybind11_static_set(PyObject *self, PyObject *obj, PyObject *value) pybind11_static_property.__set__(): Just like the above__get__().
-
inline PyTypeObject *
make_static_property_type() A
static_propertyis the same as apropertybut the__get__()and__set__()methods are modified to always use the object type instead of a concrete instance.Return value: New reference.
-
inline int
pybind11_meta_setattro(PyObject *obj, PyObject *name, PyObject *value) Types with static properties need to handle
Type.static_prop = xin a specific way.By default, Python replaces the
static_propertyitself, but for wrapped C++ types we need to callstatic_property.__set__()in order to propagate the new value to the underlying C++ data structure.
-
inline PyTypeObject *
make_default_metaclass() This metaclass is assigned by default to all pybind11 types and is required in order for static properties to function correctly.
Users may override this using
py::metaclass. Return value: New reference.
-
inline void
traverse_offset_bases(void *valueptr, const detail::type_info *tinfo, instance *self, bool (*f)(void*, instance*)) For multiple inheritance types we need to recursively register/deregister base pointers for any base classes with pointers that are difference from the instance value pointer so that we can correctly recognize an offset base class pointer.
This calls a function with any offset base ptrs.
-
inline bool
register_instance_impl(void *ptr, instance *self)
-
inline bool
deregister_instance_impl(void *ptr, instance *self)
-
inline PyObject *
make_new_instance(PyTypeObject *type) Instance creation function for all pybind11 types.
It allocates the internal instance layout for holding C++ objects and holders. Allocation is done lazily (the first time the instance is cast to a reference or pointer), and initialization is done by an
__init__function.
-
inline PyObject *
pybind11_object_new(PyTypeObject *type, PyObject*, PyObject*) Instance creation function for all pybind11 types.
It only allocates space for the C++ object, but doesn’t call the constructor an
__init__function must do that.
-
inline int
pybind11_object_init(PyObject *self, PyObject*, PyObject*) An
__init__function constructs the C++ object.Users should provide at least one of these using
py::initor directly with.def(__init__, ...). Otherwise, the following default function will be used which simply throws an exception.
-
inline void
add_patient(PyObject *nurse, PyObject *patient)
-
inline void
clear_patients(PyObject *self)
-
inline void
clear_instance(PyObject *self) Clears all internal data from the instance and removes it from registered instances in preparation for deallocation.
-
inline void
pybind11_object_dealloc(PyObject *self) Instance destructor function for all pybind11 types.
It calls
type_info.deallocto destroy the C++ object itself, while the rest is Python bookkeeping.
-
inline PyObject *
make_object_base_type(PyTypeObject *metaclass) Create the type which can be used as a common base for all classes.
This is needed in order to satisfy Python’s requirements for multiple inheritance. Return value: New reference.
-
inline PyObject *
pybind11_get_dict(PyObject *self, void*) dynamic_attr: Support for
d = instance.__dict__.
-
inline int
pybind11_set_dict(PyObject *self, PyObject *new_dict, void*) dynamic_attr: Support for
instance.__dict__ = dict().
-
inline int
pybind11_traverse(PyObject *self, visitproc visit, void *arg) dynamic_attr: Allow the garbage collector to traverse the internal instance
__dict__.
-
inline int
pybind11_clear(PyObject *self) dynamic_attr: Allow the GC to clear the dictionary.
-
inline void
enable_dynamic_attributes(PyHeapTypeObject *heap_type) Give instances of this type a
__dict__and opt into garbage collection.
-
inline int
pybind11_getbuffer(PyObject *obj, Py_buffer *view, int flags) buffer_protocol: Fill in the view as specified by flags.
-
inline void
pybind11_releasebuffer(PyObject*, Py_buffer *view) buffer_protocol: Release the resources of the buffer.
-
inline void
enable_buffer_protocol(PyHeapTypeObject *heap_type) Give this type a buffer interface.
-
inline PyObject *
make_new_python_type(const type_record &rec) Create a brand new Python type according to the
type_recordspecification.Return value: New reference.
-
-
file
descr.h - #include “common.h”
Defines
-
PYBIND11_DESCR_CONSTEXPR¶
Functions
-
template<size_t
N1, size_tN2, typename ...Ts1, typename ...Ts2, size_t...Is1, size_t...Is2>
constexpr descr<N1 + N2, Ts1..., Ts2...>plus_impl(const descr<N1, Ts1...> &a, const descr<N2, Ts2...> &b, index_sequence<Is1...>, index_sequence<Is2...>)¶
-
template<size_t
N1, size_tN2, typename ...Ts1, typename ...Ts2>
constexpr descr<N1 + N2, Ts1..., Ts2...>operator+(const descr<N1, Ts1...> &a, const descr<N2, Ts2...> &b)¶
-
template<bool
B, size_tN1, size_tN2>
constexpr enable_if_t<B, descr<N1 - 1>>_(char const (&text1)[N1], char const (&)[N2])¶
-
template<bool
B, size_tN1, size_tN2>
constexpr enable_if_t<!B, descr<N2 - 1>>_(char const (&)[N1], char const (&text2)[N2])¶
-
template<size_t
Size>
auto constexpr_() -> decltype(int_to_str<Size / 10, Size % 10>::digits)¶
-
-
file
descr.h - #include “common.h”
Defines
-
PYBIND11_DESCR_CONSTEXPR
Functions
-
template<size_t
N1, size_tN2, typename ...Ts1, typename ...Ts2, size_t...Is1, size_t...Is2>
constexpr descr<N1 + N2, Ts1..., Ts2...>plus_impl(const descr<N1, Ts1...> &a, const descr<N2, Ts2...> &b, index_sequence<Is1...>, index_sequence<Is2...>)
-
template<size_t
N1, size_tN2, typename ...Ts1, typename ...Ts2>
constexpr descr<N1 + N2, Ts1..., Ts2...>operator+(const descr<N1, Ts1...> &a, const descr<N2, Ts2...> &b)
-
constexpr descr<0>
_(char const (&)[1])
-
template<bool
B, size_tN1, size_tN2>
constexpr enable_if_t<B, descr<N1 - 1>>_(char const (&text1)[N1], char const (&)[N2])
-
template<bool
B, size_tN1, size_tN2>
constexpr enable_if_t<!B, descr<N2 - 1>>_(char const (&)[N1], char const (&text2)[N2])
-
template<bool
B, typenameT1, typenameT2>
constexpr enable_if_t<B, T1>_(const T1 &d, const T2&)
-
template<bool
B, typenameT1, typenameT2>
constexpr enable_if_t<!B, T2>_(const T1&, const T2 &d)
-
template<size_t
Size>
auto constexpr_() -> decltype(int_to_str<Size / 10, Size % 10>::digits)
-
constexpr descr<0>
concat()
-
-
file
init.h - #include “class.h”
Typedefs
-
using
Cpp= typename Class::type¶
-
using
Alias= typename Class::type_alias¶
-
using
Holder= typename Class::holder_type¶
Functions
-
inline void
no_nullptr(void *ptr)¶
-
template<typename
Class, enable_if_t<Class::has_alias, int> = 0>
boolis_alias(Cpp<Class> *ptr)¶
-
template<typename>
constexpr boolis_alias(void*)¶
-
template<typename
Class, typename ...Args, detail::enable_if_t<std::is_constructible<Class, Args...>::value, int> = 0>
inline Class *construct_or_initialize(Args&&... args)¶
-
template<typename
Class>
voidconstruct_alias_from_cpp(std::true_type, value_and_holder &v_h, Cpp<Class> &&base)¶
-
template<typename
Class>
voidconstruct_alias_from_cpp(std::false_type, value_and_holder&, Cpp<Class>&&)¶
-
template<typename
Class>
voidconstruct(...)¶
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Cpp<Class> *ptr, bool need_alias)¶
-
template<typename
Class, enable_if_t<Class::has_alias, int> = 0>
voidconstruct(value_and_holder &v_h, Alias<Class> *alias_ptr, bool)¶
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Holder<Class> holder, bool need_alias)¶
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Cpp<Class> &&result, bool need_alias)¶
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Alias<Class> &&result, bool)¶
-
template<typename
Class, typenameT>
voidsetstate(value_and_holder &v_h, T &&result, bool need_alias)¶ Set just the C++ state. Same as
__init__.
-
template<typename
Class, typenameT, typenameO, enable_if_t<std::is_convertible<O, handle>::value, int> = 0>
voidsetstate(value_and_holder &v_h, std::pair<T, O> &&result, bool need_alias)¶ Set both the C++ and Python states.
-
using
-
file
init.h - #include “class.h”
Typedefs
-
using
Cpp= typename Class::type
-
using
Alias= typename Class::type_alias
-
using
Holder= typename Class::holder_type
Functions
-
inline void
no_nullptr(void *ptr)
-
template<typename
Class, enable_if_t<Class::has_alias, int> = 0>
boolis_alias(Cpp<Class> *ptr)
-
template<typename>
constexpr boolis_alias(void*)
-
template<typename
Class, typename ...Args, detail::enable_if_t<std::is_constructible<Class, Args...>::value, int> = 0>
inline Class *construct_or_initialize(Args&&... args)
-
template<typename
Class>
voidconstruct_alias_from_cpp(std::true_type, value_and_holder &v_h, Cpp<Class> &&base)
-
template<typename
Class>
voidconstruct_alias_from_cpp(std::false_type, value_and_holder&, Cpp<Class>&&)
-
template<typename
Class>
voidconstruct(...)
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Cpp<Class> *ptr, bool need_alias)
-
template<typename
Class, enable_if_t<Class::has_alias, int> = 0>
voidconstruct(value_and_holder &v_h, Alias<Class> *alias_ptr, bool)
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Holder<Class> holder, bool need_alias)
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Cpp<Class> &&result, bool need_alias)
-
template<typename
Class>
voidconstruct(value_and_holder &v_h, Alias<Class> &&result, bool)
-
template<typename
Class, typenameT>
voidsetstate(value_and_holder &v_h, T &&result, bool need_alias) Set just the C++ state. Same as
__init__.
-
template<typename
Class, typenameT, typenameO, enable_if_t<std::is_convertible<O, handle>::value, int> = 0>
voidsetstate(value_and_holder &v_h, std::pair<T, O> &&result, bool need_alias) Set both the C++ and Python states.
-
using
-
file
internals.h - #include “../pytypes.h”
Defines
-
PYBIND11_TLS_KEY_INIT(var)¶
-
PYBIND11_TLS_GET_VALUE(key)¶
-
PYBIND11_TLS_DELETE_VALUE(key)¶
-
PYBIND11_TLS_REPLACE_VALUE(key, value)¶
-
PYBIND11_TLS_FREE(key)¶
-
PYBIND11_INTERNALS_VERSION¶ Tracks the
internalsandtype_infoABI version independent of the main library version.
-
PYBIND11_BUILD_TYPE¶ On MSVC, debug and release builds are not ABI-compatible!
-
PYBIND11_COMPILER_TYPE¶ Let’s assume that different compilers are ABI-incompatible.
-
PYBIND11_STDLIB¶
-
PYBIND11_BUILD_ABI¶ On Linux/OSX, changes in GXX_ABI_VERSION indicate ABI incompatibility.
-
PYBIND11_INTERNALS_KIND¶
-
PYBIND11_INTERNALS_ID¶
-
PYBIND11_MODULE_LOCAL_ID¶
Typedefs
-
using
type_map= std::unordered_map<std::type_index, value_type, type_hash, type_equal_to>¶
Functions
-
inline PyTypeObject *
make_static_property_type() A
static_propertyis the same as apropertybut the__get__()and__set__()methods are modified to always use the object type instead of a concrete instance.Return value: New reference.
-
inline PyTypeObject *
make_default_metaclass() This metaclass is assigned by default to all pybind11 types and is required in order for static properties to function correctly.
Users may override this using
py::metaclass. Return value: New reference.
-
inline PyObject *
make_object_base_type(PyTypeObject *metaclass) Create the type which can be used as a common base for all classes.
This is needed in order to satisfy Python’s requirements for multiple inheritance. Return value: New reference.
-
inline bool
same_type(const std::type_info &lhs, const std::type_info &rhs)¶
-
inline internals **&
get_internals_pp()¶ Each module locally stores a pointer to the
internalsdata.The data itself is shared among modules with the same
PYBIND11_INTERNALS_ID.
-
inline void
translate_exception(std::exception_ptr p)¶
-
inline void
translate_local_exception(std::exception_ptr p)¶
-
inline PYBIND11_NOINLINE internals & get_internals () Return a reference to the current
internalsdata.
-
inline type_map<type_info*> &
registered_local_types_cpp()¶ Works like
internals.registered_types_cpp, but for module-local registered types:
-
template<typename ...
Args>
const char *c_str(Args&&... args)¶ Constructs a std::string with the given arguments, stores it in
internals, and returns itsc_str().Such strings objects have a long storage duration the internal strings are only cleared when the program exits or after interpreter shutdown (when embedding), and so are suitable for c-style strings needed by Python internals (such as PyTypeObject’s tp_name).
-
inline PYBIND11_NOINLINE void * get_shared_data (const std::string &name) Returns a named pointer that is shared among all extension modules (using the same pybind11 version) running in the current interpreter.
Names starting with underscores are reserved for internal usage. Returns
nullptrif no matching entry was found.
-
inline PYBIND11_NOINLINE void * set_shared_data (const std::string &name, void *data) Set the shared data that can be later recovered by
get_shared_data().
Returns a typed reference to a shared data entry (by using
get_shared_data()) if such entry exists.Otherwise, a new object of default-constructible type
Tis added to the shared data under the given name and a reference to it is returned.
-
-
file
internals.h - #include “../pytypes.h”
Defines
-
PYBIND11_TLS_KEY_INIT(var)
-
PYBIND11_TLS_GET_VALUE(key)
-
PYBIND11_TLS_DELETE_VALUE(key)
-
PYBIND11_TLS_REPLACE_VALUE(key, value)
-
PYBIND11_TLS_FREE(key)
-
PYBIND11_INTERNALS_VERSION Tracks the
internalsandtype_infoABI version independent of the main library version.
-
PYBIND11_BUILD_TYPE On MSVC, debug and release builds are not ABI-compatible!
-
PYBIND11_COMPILER_TYPE Let’s assume that different compilers are ABI-incompatible.
-
PYBIND11_STDLIB
-
PYBIND11_BUILD_ABI On Linux/OSX, changes in GXX_ABI_VERSION indicate ABI incompatibility.
-
PYBIND11_INTERNALS_KIND
-
PYBIND11_INTERNALS_ID
-
PYBIND11_MODULE_LOCAL_ID
Typedefs
-
using
type_map= std::unordered_map<std::type_index, value_type, type_hash, type_equal_to>
Functions
-
inline PyTypeObject *
make_static_property_type() A
static_propertyis the same as apropertybut the__get__()and__set__()methods are modified to always use the object type instead of a concrete instance.Return value: New reference.
-
inline PyTypeObject *
make_default_metaclass() This metaclass is assigned by default to all pybind11 types and is required in order for static properties to function correctly.
Users may override this using
py::metaclass. Return value: New reference.
-
inline PyObject *
make_object_base_type(PyTypeObject *metaclass) Create the type which can be used as a common base for all classes.
This is needed in order to satisfy Python’s requirements for multiple inheritance. Return value: New reference.
-
inline bool
same_type(const std::type_info &lhs, const std::type_info &rhs)
-
inline internals **&
get_internals_pp() Each module locally stores a pointer to the
internalsdata.The data itself is shared among modules with the same
PYBIND11_INTERNALS_ID.
-
inline void
translate_exception(std::exception_ptr p)
-
inline void
translate_local_exception(std::exception_ptr p)
-
inline PYBIND11_NOINLINE internals & get_internals () Return a reference to the current
internalsdata.
-
inline type_map<type_info*> &
registered_local_types_cpp() Works like
internals.registered_types_cpp, but for module-local registered types:
-
template<typename ...
Args>
const char *c_str(Args&&... args) Constructs a std::string with the given arguments, stores it in
internals, and returns itsc_str().Such strings objects have a long storage duration the internal strings are only cleared when the program exits or after interpreter shutdown (when embedding), and so are suitable for c-style strings needed by Python internals (such as PyTypeObject’s tp_name).
-
inline PYBIND11_NOINLINE void * get_shared_data (const std::string &name) Returns a named pointer that is shared among all extension modules (using the same pybind11 version) running in the current interpreter.
Names starting with underscores are reserved for internal usage. Returns
nullptrif no matching entry was found.
-
inline PYBIND11_NOINLINE void * set_shared_data (const std::string &name, void *data) Set the shared data that can be later recovered by
get_shared_data().
-
template<typename
T>
T &get_or_create_shared_data(const std::string &name) Returns a typed reference to a shared data entry (by using
get_shared_data()) if such entry exists.Otherwise, a new object of default-constructible type
Tis added to the shared data under the given name and a reference to it is returned.
-
-
file
typeid.h - #include <cstdio>#include <cstdlib>#include “common.h”
-
file
typeid.h - #include <cstdio>#include <cstdlib>#include “common.h”
Functions
-
inline void
erase_all(std::string &string, const std::string &search) Erase all occurrences of a substring.
-
inline PYBIND11_NOINLINE void clean_type_id (std::string &name)
-
template<typename
T>
static std::stringtype_id() Return a string representation of a C++ type.
-
inline void
-
file
eigen.h - #include “numpy.h”#include <Eigen/Core>#include <Eigen/SparseCore>
Typedefs
-
using
EigenDStride= Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>¶
-
using
EigenDRef= Eigen::Ref<MatrixType, 0, EigenDStride>¶
-
using
EigenDMap= Eigen::Map<MatrixType, 0, EigenDStride>¶
-
using
EigenIndex= EIGEN_DEFAULT_DENSE_INDEX_TYPE¶
-
using
is_eigen_dense_map= all_of<is_template_base_of<Eigen::DenseBase, T>, std::is_base_of<Eigen::MapBase<T, Eigen::ReadOnlyAccessors>, T>>¶
-
using
is_eigen_mutable_map= std::is_base_of<Eigen::MapBase<T, Eigen::WriteAccessors>, T>¶
-
using
is_eigen_dense_plain= all_of<negation<is_eigen_dense_map<T>>, is_template_base_of<Eigen::PlainObjectBase, T>>¶
-
using
is_eigen_sparse= is_template_base_of<Eigen::SparseMatrixBase, T>¶
-
using
is_eigen_other= all_of<is_template_base_of<Eigen::EigenBase, T>, negation<any_of<is_eigen_dense_map<T>, is_eigen_dense_plain<T>, is_eigen_sparse<T>>>>¶
-
using
-
file
eigen.h - #include “numpy.h”#include <Eigen/Core>#include <Eigen/SparseCore>
Typedefs
-
using
EigenDStride= Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>
-
using
EigenDRef= Eigen::Ref<MatrixType, 0, EigenDStride>
-
using
EigenDMap= Eigen::Map<MatrixType, 0, EigenDStride>
-
using
EigenIndex= EIGEN_DEFAULT_DENSE_INDEX_TYPE
-
using
is_eigen_dense_map= all_of<is_template_base_of<Eigen::DenseBase, T>, std::is_base_of<Eigen::MapBase<T, Eigen::ReadOnlyAccessors>, T>>
-
using
is_eigen_mutable_map= std::is_base_of<Eigen::MapBase<T, Eigen::WriteAccessors>, T>
-
using
is_eigen_dense_plain= all_of<negation<is_eigen_dense_map<T>>, is_template_base_of<Eigen::PlainObjectBase, T>>
-
using
is_eigen_sparse= is_template_base_of<Eigen::SparseMatrixBase, T>
-
using
is_eigen_other= all_of<is_template_base_of<Eigen::EigenBase, T>, negation<any_of<is_eigen_dense_map<T>, is_eigen_dense_plain<T>, is_eigen_sparse<T>>>>
Functions
-
template<typename
props>
handleeigen_array_cast(typename props::Type const &src, handle base = handle(), bool writeable = true)
-
template<typename
props, typenameType, typename = enable_if_t<is_eigen_dense_plain<Type>::value>>
handleeigen_encapsulate(Type *src)
-
using
-
file
embed.h - #include “pybind11.h”#include “eval.h”
Defines
-
PYBIND11_EMBEDDED_MODULE_IMPL(name)¶
-
PYBIND11_EMBEDDED_MODULE(name, variable)¶ Add a new module to the table of builtins for the interpreter.
Must be defined in global scope. The first macro parameter is the name of the module (without quotes). The second parameter is the variable which will be used as the interface to add functions and classes to the module.
.. code-block:: cpp
… initialize functions and classes here m.def(“foo”, []() { return “Hello, World!”; }); }PYBIND11_EMBEDDED_MODULE(example, m) {
Functions
-
inline void
initialize_interpreter(bool init_signal_handlers = true)¶ Initialize the Python interpreter.
No other pybind11 or CPython API functions can be called before this is done; with the exception of
PYBIND11_EMBEDDED_MODULE. The optional parameter can be used to skip the registration of signal handlers (see thePython documentation_ for details). Calling this function again after the interpreter has already been initialized is a fatal error.If initializing the Python interpreter fails, then the program is terminated. (This is controlled by the CPython runtime and is an exception to pybind11’s normal behavior of throwing exceptions on errors.)
.. _Python documentation: https://docs.python.org/3/c-api/init.html#c.Py_InitializeEx
-
inline void
finalize_interpreter()¶ Shut down the Python interpreter.
No pybind11 or CPython API functions can be called after this. In addition, pybind11 objects must not outlive the interpreter:
.. code-block:: cpp
{ // BAD py::initialize_interpreter(); auto hello = py::str("Hello, World!"); py::finalize_interpreter(); } // <-- BOOM, hello's destructor is called after interpreter shutdown { // GOOD py::initialize_interpreter(); { // scoped auto hello = py::str("Hello, World!"); } // <-- OK, hello is cleaned up properly py::finalize_interpreter(); } { // BETTER py::scoped_interpreter guard{}; auto hello = py::str("Hello, World!"); }
.. warning::
The interpreter can be restarted by calling `initialize_interpreter` again. Modules created using pybind11 can be safely re-initialized. However, Python itself cannot completely unload binary extension modules and there are several caveats with regard to interpreter restarting. All the details can be found in the CPython documentation. In short, not all interpreter memory may be freed, either due to reference cycles or user-created global data.
-
-
file
embed.h - #include “pybind11.h”#include “eval.h”
Defines
-
PYBIND11_EMBEDDED_MODULE_IMPL(name)
-
PYBIND11_EMBEDDED_MODULE(name, variable) Add a new module to the table of builtins for the interpreter.
Must be defined in global scope. The first macro parameter is the name of the module (without quotes). The second parameter is the variable which will be used as the interface to add functions and classes to the module.
.. code-block:: cpp
… initialize functions and classes here m.def(“foo”, []() { return “Hello, World!”; }); }PYBIND11_EMBEDDED_MODULE(example, m) {
Functions
-
inline void
initialize_interpreter(bool init_signal_handlers = true) Initialize the Python interpreter.
No other pybind11 or CPython API functions can be called before this is done; with the exception of
PYBIND11_EMBEDDED_MODULE. The optional parameter can be used to skip the registration of signal handlers (see thePython documentation_ for details). Calling this function again after the interpreter has already been initialized is a fatal error.If initializing the Python interpreter fails, then the program is terminated. (This is controlled by the CPython runtime and is an exception to pybind11’s normal behavior of throwing exceptions on errors.)
.. _Python documentation: https://docs.python.org/3/c-api/init.html#c.Py_InitializeEx
-
inline void
finalize_interpreter() Shut down the Python interpreter.
No pybind11 or CPython API functions can be called after this. In addition, pybind11 objects must not outlive the interpreter:
.. code-block:: cpp
{ // BAD py::initialize_interpreter(); auto hello = py::str("Hello, World!"); py::finalize_interpreter(); } // <-- BOOM, hello's destructor is called after interpreter shutdown { // GOOD py::initialize_interpreter(); { // scoped auto hello = py::str("Hello, World!"); } // <-- OK, hello is cleaned up properly py::finalize_interpreter(); } { // BETTER py::scoped_interpreter guard{}; auto hello = py::str("Hello, World!"); }
.. warning::
The interpreter can be restarted by calling `initialize_interpreter` again. Modules created using pybind11 can be safely re-initialized. However, Python itself cannot completely unload binary extension modules and there are several caveats with regard to interpreter restarting. All the details can be found in the CPython documentation. In short, not all interpreter memory may be freed, either due to reference cycles or user-created global data.
-
-
file
eval.h - #include “pybind11.h”
Enums
-
enum
eval_mode¶ Values:
-
enumerator
eval_expr¶ Evaluate a string containing an isolated expression.
-
enumerator
eval_single_statement¶ Evaluate a string containing a single statement. Returns
none.
-
enumerator
eval_statements¶ Evaluate a string containing a sequence of statement. Returns
none.
-
enumerator
eval_expr Evaluate a string containing an isolated expression.
-
enumerator
eval_single_statement Evaluate a string containing a single statement. Returns
none.
-
enumerator
eval_statements Evaluate a string containing a sequence of statement. Returns
none.
-
enumerator
Functions
-
template<eval_mode
mode= eval_expr>
objecteval(str expr, object global = globals(), object local = object())¶
-
template<eval_mode
mode= eval_expr, size_tN>
objecteval(const char (&s)[N], object global = globals(), object local = object())¶
-
enum
-
file
eval.h - #include “pybind11.h”
Enums
-
enum
eval_mode Values:
-
enumerator
eval_expr Evaluate a string containing an isolated expression.
-
enumerator
eval_single_statement Evaluate a string containing a single statement. Returns
none.
-
enumerator
eval_statements Evaluate a string containing a sequence of statement. Returns
none.
-
enumerator
eval_expr Evaluate a string containing an isolated expression.
-
enumerator
eval_single_statement Evaluate a string containing a single statement. Returns
none.
-
enumerator
eval_statements Evaluate a string containing a sequence of statement. Returns
none.
-
enumerator
-
enum
-
file
functional.h - #include “pybind11.h”#include <functional>
-
file
functional.h - #include “pybind11.h”#include <functional>
-
file
iostream.h - #include “pybind11.h”#include <streambuf>#include <ostream>#include <string>#include <memory>#include <iostream>
Functions
-
inline class_<detail::OstreamRedirect>
add_ostream_redirect(module m, std::string name = "ostream_redirect")¶ This is a helper function to add a C++ redirect context manager to Python instead of using a C++ guard.
To use it, add the following to your binding code:
.. code-block:: cpp
#include <pybind11/iostream.h> ... py::add_ostream_redirect(m, "ostream_redirect");
You now have a Python context manager that redirects your output:
.. code-block:: python
with m.ostream_redirect(): m.print_to_cout_function()
This manager can optionally be told which streams to operate on:
.. code-block:: python
with m.ostream_redirect(stdout=true, stderr=true): m.noisy_function_with_error_printing()
-
inline class_<detail::OstreamRedirect>
-
file
iostream.h - #include “pybind11.h”#include <streambuf>#include <ostream>#include <string>#include <memory>#include <iostream>
Functions
-
inline class_<detail::OstreamRedirect>
add_ostream_redirect(module m, std::string name = "ostream_redirect") This is a helper function to add a C++ redirect context manager to Python instead of using a C++ guard.
To use it, add the following to your binding code:
.. code-block:: cpp
#include <pybind11/iostream.h> ... py::add_ostream_redirect(m, "ostream_redirect");
You now have a Python context manager that redirects your output:
.. code-block:: python
with m.ostream_redirect(): m.print_to_cout_function()
This manager can optionally be told which streams to operate on:
.. code-block:: python
with m.ostream_redirect(stdout=true, stderr=true): m.noisy_function_with_error_printing()
-
inline class_<detail::OstreamRedirect>
-
file
numpy.h - #include “pybind11.h”#include “complex.h”#include <numeric>#include <algorithm>#include <array>#include <cstdint>#include <cstdlib>#include <cstring>#include <sstream>#include <string>#include <functional>#include <utility>#include <vector>#include <typeindex>
Defines
-
DECL_NPY_API(Func)¶
-
PYBIND11_DECL_CHAR_FMT¶
-
PYBIND11_FIELD_DESCRIPTOR_EX(T, Field, Name)¶
-
PYBIND11_FIELD_DESCRIPTOR(T, Field)¶
-
PYBIND11_EVAL0(...)¶
-
PYBIND11_EVAL1(...)¶
-
PYBIND11_EVAL2(...)¶
-
PYBIND11_EVAL3(...)¶
-
PYBIND11_EVAL4(...)¶
-
PYBIND11_EVAL(...)¶
-
PYBIND11_MAP_END(...)¶
-
PYBIND11_MAP_OUT¶
-
PYBIND11_MAP_COMMA¶
-
PYBIND11_MAP_GET_END()¶
-
PYBIND11_MAP_NEXT0(test, next, ...)¶
-
PYBIND11_MAP_NEXT1(test, next)¶
-
PYBIND11_MAP_NEXT(test, next)¶
-
PYBIND11_MAP_LIST_NEXT1(test, next)¶
-
PYBIND11_MAP_LIST_NEXT(test, next)¶
-
PYBIND11_MAP_LIST0(f, t, x, peek, ...)¶
-
PYBIND11_MAP_LIST1(f, t, x, peek, ...)¶
-
PYBIND11_MAP_LIST(f, t, ...)¶
-
PYBIND11_NUMPY_DTYPE(Type, ...)¶
-
PYBIND11_MAP2_LIST_NEXT1(test, next)¶
-
PYBIND11_MAP2_LIST_NEXT(test, next)¶
-
PYBIND11_MAP2_LIST0(f, t, x1, x2, peek, ...)¶
-
PYBIND11_MAP2_LIST1(f, t, x1, x2, peek, ...)¶
-
PYBIND11_MAP2_LIST(f, t, ...)¶
-
PYBIND11_NUMPY_DTYPE_EX(Type, ...)¶
Typedefs
-
using
remove_all_extents_t= typename array_info<T>::type¶
-
using
is_pod_struct= all_of<std::is_standard_layout<T>, std::is_trivially_copyable<T>, satisfies_none_of<T, std::is_reference, std::is_array, is_std_array, std::is_arithmetic, is_complex, std::is_enum>>¶
-
using
array_iterator= typename std::add_pointer<T>::type¶
Enums
Functions
-
inline PYBIND11_NOINLINE void load_numpy_internals (numpy_internals *&ptr)
-
inline numpy_internals &
get_numpy_internals()¶
-
template<typename
Concrete>
constexpr intplatform_lookup()¶
-
template<typename
Concrete, typenameT, typename ...Ts, typename ...Ints>
constexpr intplatform_lookup(int I, Ints... Is)¶
-
inline PyArray_Proxy *
array_proxy(void *ptr)¶
-
inline const PyArray_Proxy *
array_proxy(const void *ptr)¶
-
inline PyArrayDescr_Proxy *
array_descriptor_proxy(PyObject *ptr)¶
-
inline const PyArrayDescr_Proxy *
array_descriptor_proxy(const PyObject *ptr)¶
-
inline bool
check_flags(const void *ptr, int flag)¶
-
template<ssize_t
Dim= 0, typenameStrides, typename ...Ix>
ssize_tbyte_offset_unsafe(const Strides &strides, ssize_t i, Ix... index)¶
-
inline PYBIND11_NOINLINE void register_structured_dtype (any_container< field_descriptor > fields, const std::type_info &tinfo, ssize_t itemsize, bool(*direct_converter)(PyObject *, void *&))
-
template<class
T>
array_iterator<T>array_begin(const buffer_info &buffer)¶
-
template<class
T>
array_iterator<T>array_end(const buffer_info &buffer)¶
-
template<size_t
N>
broadcast_trivialbroadcast(const std::array<buffer_info, N> &buffers, ssize_t &ndim, std::vector<ssize_t> &shape)¶
-
template<typename
Func, typenameReturn, typename ...Args>
vectorize_helper<Func, Return, Args...>vectorize_extractor(const Func &f, Return (*)(Args...))¶
-
template<typename
Return, typename ...Args>
detail::vectorize_helper<Return (*)(Args...), Return, Args...>vectorize(Return (*f)(Args...))¶
-
-
file
numpy.h - #include “pybind11.h”#include “complex.h”#include <numeric>#include <algorithm>#include <array>#include <cstdint>#include <cstdlib>#include <cstring>#include <sstream>#include <string>#include <functional>#include <utility>#include <vector>#include <typeindex>
Defines
-
DECL_NPY_API(Func)
-
PYBIND11_DECL_CHAR_FMT
-
PYBIND11_FIELD_DESCRIPTOR_EX(T, Field, Name)
-
PYBIND11_FIELD_DESCRIPTOR(T, Field)
-
PYBIND11_EVAL0(...)
-
PYBIND11_EVAL1(...)
-
PYBIND11_EVAL2(...)
-
PYBIND11_EVAL3(...)
-
PYBIND11_EVAL4(...)
-
PYBIND11_EVAL(...)
-
PYBIND11_MAP_END(...)
-
PYBIND11_MAP_OUT
-
PYBIND11_MAP_COMMA
-
PYBIND11_MAP_GET_END()
-
PYBIND11_MAP_NEXT0(test, next, ...)
-
PYBIND11_MAP_NEXT1(test, next)
-
PYBIND11_MAP_NEXT(test, next)
-
PYBIND11_MAP_LIST_NEXT1(test, next)
-
PYBIND11_MAP_LIST_NEXT(test, next)
-
PYBIND11_MAP_LIST0(f, t, x, peek, ...)
-
PYBIND11_MAP_LIST1(f, t, x, peek, ...)
-
PYBIND11_MAP_LIST(f, t, ...)
-
PYBIND11_NUMPY_DTYPE(Type, ...)
-
PYBIND11_MAP2_LIST_NEXT1(test, next)
-
PYBIND11_MAP2_LIST_NEXT(test, next)
-
PYBIND11_MAP2_LIST0(f, t, x1, x2, peek, ...)
-
PYBIND11_MAP2_LIST1(f, t, x1, x2, peek, ...)
-
PYBIND11_MAP2_LIST(f, t, ...)
-
PYBIND11_NUMPY_DTYPE_EX(Type, ...)
Typedefs
-
using
remove_all_extents_t= typename array_info<T>::type
-
using
is_pod_struct= all_of<std::is_standard_layout<T>, std::is_trivially_copyable<T>, satisfies_none_of<T, std::is_reference, std::is_array, is_std_array, std::is_arithmetic, is_complex, std::is_enum>>
-
using
array_iterator= typename std::add_pointer<T>::type
Enums
-
enum
broadcast_trivial Values:
-
enumerator
non_trivial
-
enumerator
c_trivial
-
enumerator
f_trivial
-
enumerator
non_trivial
-
enumerator
c_trivial
-
enumerator
f_trivial
-
enumerator
Functions
-
inline PYBIND11_NOINLINE void load_numpy_internals (numpy_internals *&ptr)
-
inline numpy_internals &
get_numpy_internals()
-
template<typename
Concrete>
constexpr intplatform_lookup()
-
template<typename
Concrete, typenameT, typename ...Ts, typename ...Ints>
constexpr intplatform_lookup(int I, Ints... Is)
-
inline PyArray_Proxy *
array_proxy(void *ptr)
-
inline const PyArray_Proxy *
array_proxy(const void *ptr)
-
inline PyArrayDescr_Proxy *
array_descriptor_proxy(PyObject *ptr)
-
inline const PyArrayDescr_Proxy *
array_descriptor_proxy(const PyObject *ptr)
-
inline bool
check_flags(const void *ptr, int flag)
-
template<ssize_t
Dim= 0, typenameStrides, typename ...Ix>
ssize_tbyte_offset_unsafe(const Strides &strides, ssize_t i, Ix... index)
-
inline PYBIND11_NOINLINE void register_structured_dtype (any_container< field_descriptor > fields, const std::type_info &tinfo, ssize_t itemsize, bool(*direct_converter)(PyObject *, void *&))
-
template<class
T>
array_iterator<T>array_begin(const buffer_info &buffer)
-
template<class
T>
array_iterator<T>array_end(const buffer_info &buffer)
-
template<size_t
N>
broadcast_trivialbroadcast(const std::array<buffer_info, N> &buffers, ssize_t &ndim, std::vector<ssize_t> &shape)
-
template<typename
Func, typenameReturn, typename ...Args>
vectorize_helper<Func, Return, Args...>vectorize_extractor(const Func &f, Return (*)(Args...))
-
template<typename
Return, typename ...Args>
detail::vectorize_helper<Return (*)(Args...), Return, Args...>vectorize(Return (*f)(Args...))
-
-
file
operators.h - #include “pybind11.h”
Defines
-
PYBIND11_BINARY_OPERATOR(id, rid, op, expr)¶
-
PYBIND11_INPLACE_OPERATOR(id, op, expr)¶
-
PYBIND11_UNARY_OPERATOR(id, op, expr)¶
Enums
-
enum
op_id¶ Enumeration with all supported operator types.
Values:
-
enumerator
op_add¶
-
enumerator
op_sub¶
-
enumerator
op_mul¶
-
enumerator
op_div¶
-
enumerator
op_mod¶
-
enumerator
op_divmod¶
-
enumerator
op_pow¶
-
enumerator
op_lshift¶
-
enumerator
op_rshift¶
-
enumerator
op_and¶
-
enumerator
op_xor¶
-
enumerator
op_or¶
-
enumerator
op_neg¶
-
enumerator
op_pos¶
-
enumerator
op_abs¶
-
enumerator
op_invert¶
-
enumerator
op_int¶
-
enumerator
op_long¶
-
enumerator
op_float¶
-
enumerator
op_str¶
-
enumerator
op_cmp¶
-
enumerator
op_gt¶
-
enumerator
op_ge¶
-
enumerator
op_lt¶
-
enumerator
op_le¶
-
enumerator
op_eq¶
-
enumerator
op_ne¶
-
enumerator
op_iadd¶
-
enumerator
op_isub¶
-
enumerator
op_imul¶
-
enumerator
op_idiv¶
-
enumerator
op_imod¶
-
enumerator
op_ilshift¶
-
enumerator
op_irshift¶
-
enumerator
op_iand¶
-
enumerator
op_ixor¶
-
enumerator
op_ior¶
-
enumerator
op_complex¶
-
enumerator
op_bool¶
-
enumerator
op_nonzero¶
-
enumerator
op_repr¶
-
enumerator
op_truediv¶
-
enumerator
op_itruediv¶
-
enumerator
op_hash¶
-
enumerator
op_add
-
enumerator
op_sub
-
enumerator
op_mul
-
enumerator
op_div
-
enumerator
op_mod
-
enumerator
op_divmod
-
enumerator
op_pow
-
enumerator
op_lshift
-
enumerator
op_rshift
-
enumerator
op_and
-
enumerator
op_xor
-
enumerator
op_or
-
enumerator
op_neg
-
enumerator
op_pos
-
enumerator
op_abs
-
enumerator
op_invert
-
enumerator
op_int
-
enumerator
op_long
-
enumerator
op_float
-
enumerator
op_str
-
enumerator
op_cmp
-
enumerator
op_gt
-
enumerator
op_ge
-
enumerator
op_lt
-
enumerator
op_le
-
enumerator
op_eq
-
enumerator
op_ne
-
enumerator
op_iadd
-
enumerator
op_isub
-
enumerator
op_imul
-
enumerator
op_idiv
-
enumerator
op_imod
-
enumerator
op_ilshift
-
enumerator
op_irshift
-
enumerator
op_iand
-
enumerator
op_ixor
-
enumerator
op_ior
-
enumerator
op_complex
-
enumerator
op_bool
-
enumerator
op_nonzero
-
enumerator
op_repr
-
enumerator
op_truediv
-
enumerator
op_itruediv
-
enumerator
op_hash
-
enumerator
-
-
file
operators.h - #include “pybind11.h”
Defines
-
PYBIND11_BINARY_OPERATOR(id, rid, op, expr)
-
PYBIND11_INPLACE_OPERATOR(id, op, expr)
-
PYBIND11_UNARY_OPERATOR(id, op, expr)
Enums
-
enum
op_id Enumeration with all supported operator types.
Values:
-
enumerator
op_add
-
enumerator
op_sub
-
enumerator
op_mul
-
enumerator
op_div
-
enumerator
op_mod
-
enumerator
op_divmod
-
enumerator
op_pow
-
enumerator
op_lshift
-
enumerator
op_rshift
-
enumerator
op_and
-
enumerator
op_xor
-
enumerator
op_or
-
enumerator
op_neg
-
enumerator
op_pos
-
enumerator
op_abs
-
enumerator
op_invert
-
enumerator
op_int
-
enumerator
op_long
-
enumerator
op_float
-
enumerator
op_str
-
enumerator
op_cmp
-
enumerator
op_gt
-
enumerator
op_ge
-
enumerator
op_lt
-
enumerator
op_le
-
enumerator
op_eq
-
enumerator
op_ne
-
enumerator
op_iadd
-
enumerator
op_isub
-
enumerator
op_imul
-
enumerator
op_idiv
-
enumerator
op_imod
-
enumerator
op_ilshift
-
enumerator
op_irshift
-
enumerator
op_iand
-
enumerator
op_ixor
-
enumerator
op_ior
-
enumerator
op_complex
-
enumerator
op_bool
-
enumerator
op_nonzero
-
enumerator
op_repr
-
enumerator
op_truediv
-
enumerator
op_itruediv
-
enumerator
op_hash
-
enumerator
op_add
-
enumerator
op_sub
-
enumerator
op_mul
-
enumerator
op_div
-
enumerator
op_mod
-
enumerator
op_divmod
-
enumerator
op_pow
-
enumerator
op_lshift
-
enumerator
op_rshift
-
enumerator
op_and
-
enumerator
op_xor
-
enumerator
op_or
-
enumerator
op_neg
-
enumerator
op_pos
-
enumerator
op_abs
-
enumerator
op_invert
-
enumerator
op_int
-
enumerator
op_long
-
enumerator
op_float
-
enumerator
op_str
-
enumerator
op_cmp
-
enumerator
op_gt
-
enumerator
op_ge
-
enumerator
op_lt
-
enumerator
op_le
-
enumerator
op_eq
-
enumerator
op_ne
-
enumerator
op_iadd
-
enumerator
op_isub
-
enumerator
op_imul
-
enumerator
op_idiv
-
enumerator
op_imod
-
enumerator
op_ilshift
-
enumerator
op_irshift
-
enumerator
op_iand
-
enumerator
op_ixor
-
enumerator
op_ior
-
enumerator
op_complex
-
enumerator
op_bool
-
enumerator
op_nonzero
-
enumerator
op_repr
-
enumerator
op_truediv
-
enumerator
op_itruediv
-
enumerator
op_hash
-
enumerator
-
enum
op_type Values:
-
enumerator
op_l
-
enumerator
op_r
-
enumerator
op_u
-
enumerator
op_l
-
enumerator
op_r
-
enumerator
op_u
-
enumerator
Functions
-
inline self_t
__self() Don’t warn about an unused variable.
-
-
file
options.h - #include “detail/common.h”
-
file
options.h - #include “detail/common.h”
-
file
pybind11.h - #include “attr.h”#include “options.h”#include “detail/class.h”#include “detail/init.h”
Defines
-
PYBIND11_ENUM_OP_STRICT(op, expr, strict_behavior)¶
-
PYBIND11_ENUM_OP_CONV(op, expr)¶
-
PYBIND11_ENUM_OP_CONV_LHS(op, expr)¶
-
PYBIND11_THROW¶
-
PYBIND11_OVERLOAD_INT(ret_type, cname, name, ...)¶
-
PYBIND11_OVERLOAD_NAME(ret_type, cname, name, fn, ...)¶ Macro to populate the virtual method in the trampoline class.
This macro tries to look up a method named ‘fn’ from the Python side, deals with the :ref:
giland necessary argument conversions to call this method and return the appropriate type. See :ref:overriding_virtualsfor more information. This macro should be used when the method name in C is not the same as the method name in Python. For example with__str__... code-block:: cpp
std::string toString() override { PYBIND11_OVERLOAD_NAME( std::string, // Return type (ret_type) Animal, // Parent class (cname) toString, // Name of function in C++ (name) “__str__”, // Name of method in Python (fn) ); }
-
PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...)¶ Macro for pure virtual functions, this function is identical to :c:macro:
PYBIND11_OVERLOAD_NAME, except that it throws if no overload can be found.
-
PYBIND11_OVERLOAD(ret_type, cname, fn, ...)¶ Macro to populate the virtual method in the trampoline class.
This macro tries to look up the method from the Python side, deals with the :ref:
giland necessary argument conversions to call this method and return the appropriate type. This macro should be used if the method name in C and in Python are identical. See :ref:overriding_virtualsfor more information... code-block:: cpp
class PyAnimal : public Animal { public: Inherit the constructors using Animal::Animal;
Trampoline (need one for each virtual function) std::string go(int n_times) override { PYBIND11_OVERLOAD_PURE( std::string, // Return type (ret_type) Animal, // Parent class (cname) go, // Name of function in C++ (must match Python name) (fn) n_times // Argument(s) (…) ); } };
-
PYBIND11_OVERLOAD_PURE(ret_type, cname, fn, ...)¶ Macro for pure virtual functions, this function is identical to :c:macro:
PYBIND11_OVERLOAD, except that it throws if no overload can be found.
Functions
-
inline dict
globals() Return a dictionary representing the global variables in the current execution frame, or
__main__.__dict__if there is no frame (usually when the interpreter is embedded).
-
template<typename
T, typename = void_t<decltype(static_cast<void *(*)(size_t)>(T::operator new))>>
voidset_operator_new(type_record *r)¶ Set the pointer to operator new if it exists. The cast is needed because it can be overloaded.
-
template<typename>
voidset_operator_new(...)¶
-
template<typename
T, enable_if_t<has_operator_delete<T>::value, int> = 0>
voidcall_operator_delete(T *p, size_t, size_t)¶ Call class-specific delete if it exists or global otherwise. Can also be an overload set.
-
template<typename, typename
F>
automethod_adaptor(F &&f) -> decltype(std::forward<F>(f))¶ Given a pointer to a member function, cast it to its
Derivedversion.Forward everything else unchanged.
-
template<typename
Derived, typenameReturn, typenameClass, typename ...Args>
automethod_adaptor(Return (Class::* pmf)(Args...)) -> Return (Derived::*)(Args...)¶
-
template<typename ...
Args>
detail::initimpl::constructor<Args...>init()¶ Binds an existing constructor taking arguments Args…
-
template<typename ...
Args>
detail::initimpl::alias_constructor<Args...>init_alias()¶ Like
init<Args...>(), but the instance is always constructed through the alias class (even when not inheriting on the Python side).
-
template<typename
Func, typenameRet= detail::initimpl::factory<Func>>
Retinit(Func &&f)¶ Binds a factory function as a constructor.
-
template<typename
CFunc, typenameAFunc, typenameRet= detail::initimpl::factory<CFunc, AFunc>>
Retinit(CFunc &&c, AFunc &&a)¶ Dual-argument factory function: the first function is called when no alias is needed, the second when an alias is needed (i.e.
due to python-side inheritance). Arguments must be identical.
-
template<typename
GetState, typenameSetState>
detail::initimpl::pickle_factory<GetState, SetState>pickle(GetState &&g, SetState &&s)¶ Binds pickling functions
__getstate__and__setstate__and ensures that the type returned by__getstate__is the same as the argument accepted by__setstate__.
-
inline PYBIND11_NOINLINE void keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret)
-
inline std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache (PyTypeObject *type)
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameIterator, typenameSentinel, typenameValueType= decltype(*std::declval<Iterator>()), typename ...Extra>
iteratormake_iterator(Iterator first, Sentinel last, Extra&&... extra)¶ Makes a python iterator from a first and past-the-end C++ InputIterator.
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameIterator, typenameSentinel, typenameKeyType= decltype((*std::declval<Iterator>()).first), typename ...Extra>
iteratormake_key_iterator(Iterator first, Sentinel last, Extra&&... extra)¶ Makes an python iterator over the keys (
.first) of a iterator over pairs from a first and past-the-end InputIterator.
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameType, typename ...Extra>
iteratormake_iterator(Type &value, Extra&&... extra)¶ Makes an iterator over values of an stl container or other container supporting
std::begin()/std::end()
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameType, typename ...Extra>
iteratormake_key_iterator(Type &value, Extra&&... extra)¶ Makes an iterator over the keys (
.first) of a stl map-like container supportingstd::begin()/std::end()
-
template<typename
InputType, typenameOutputType>
voidimplicitly_convertible()¶
-
template<typename
ExceptionTranslator>
voidregister_exception_translator(ExceptionTranslator &&translator)¶
-
template<typename
CppException>
exception<CppException> &get_exception_object()¶
-
template<typename
CppException>
exception<CppException> ®ister_exception(handle scope, const char *name, PyObject *base = PyExc_Exception)¶ Registers a Python exception in
mof the givennameand installs an exception translator to translate the C++ exception to the created Python exception using the exceptions what() method.This is intended for simple exception translations; for more complex translation, register the exception object and translator directly.
-
inline PYBIND11_NOINLINE void print (tuple args, dict kwargs)
-
template<return_value_policy
policy= return_value_policy::automatic_reference, typename ...Args>
voidprint(Args&&... args)¶
-
inline function
get_type_overload(const void *this_ptr, const detail::type_info *this_type, const char *name)¶
-
template<class
T>
functionget_overload(const T *this_ptr, const char *name)¶ Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr.
:this_ptr: The pointer to the object the overload should be retrieved for. This should be the first non-trampoline class encountered in the inheritance chain. :name: The name of the overloaded Python method to retrieve. :return: The Python method by this name from the object or an empty function wrapper.
-
-
file
pybind11.h - #include “attr.h”#include “options.h”#include “detail/class.h”#include “detail/init.h”
Defines
-
PYBIND11_ENUM_OP_STRICT(op, expr, strict_behavior)
-
PYBIND11_ENUM_OP_CONV(op, expr)
-
PYBIND11_ENUM_OP_CONV_LHS(op, expr)
-
PYBIND11_THROW
-
PYBIND11_OVERLOAD_INT(ret_type, cname, name, ...)
-
PYBIND11_OVERLOAD_NAME(ret_type, cname, name, fn, ...) Macro to populate the virtual method in the trampoline class.
This macro tries to look up a method named ‘fn’ from the Python side, deals with the :ref:
giland necessary argument conversions to call this method and return the appropriate type. See :ref:overriding_virtualsfor more information. This macro should be used when the method name in C is not the same as the method name in Python. For example with__str__... code-block:: cpp
std::string toString() override { PYBIND11_OVERLOAD_NAME( std::string, // Return type (ret_type) Animal, // Parent class (cname) toString, // Name of function in C++ (name) “__str__”, // Name of method in Python (fn) ); }
-
PYBIND11_OVERLOAD_PURE_NAME(ret_type, cname, name, fn, ...) Macro for pure virtual functions, this function is identical to :c:macro:
PYBIND11_OVERLOAD_NAME, except that it throws if no overload can be found.
-
PYBIND11_OVERLOAD(ret_type, cname, fn, ...) Macro to populate the virtual method in the trampoline class.
This macro tries to look up the method from the Python side, deals with the :ref:
giland necessary argument conversions to call this method and return the appropriate type. This macro should be used if the method name in C and in Python are identical. See :ref:overriding_virtualsfor more information... code-block:: cpp
class PyAnimal : public Animal { public: Inherit the constructors using Animal::Animal;
Trampoline (need one for each virtual function) std::string go(int n_times) override { PYBIND11_OVERLOAD_PURE( std::string, // Return type (ret_type) Animal, // Parent class (cname) go, // Name of function in C++ (must match Python name) (fn) n_times // Argument(s) (…) ); } };
-
PYBIND11_OVERLOAD_PURE(ret_type, cname, fn, ...) Macro for pure virtual functions, this function is identical to :c:macro:
PYBIND11_OVERLOAD, except that it throws if no overload can be found.
Functions
-
inline dict
globals() Return a dictionary representing the global variables in the current execution frame, or
__main__.__dict__if there is no frame (usually when the interpreter is embedded).
-
template<typename
T, typename = void_t<decltype(static_cast<void *(*)(size_t)>(T::operator new))>>
voidset_operator_new(type_record *r) Set the pointer to operator new if it exists. The cast is needed because it can be overloaded.
-
template<typename>
voidset_operator_new(...)
-
template<typename
T, enable_if_t<has_operator_delete<T>::value, int> = 0>
voidcall_operator_delete(T *p, size_t, size_t) Call class-specific delete if it exists or global otherwise. Can also be an overload set.
-
template<typename, typename
F>
automethod_adaptor(F &&f) -> decltype(std::forward<F>(f)) Given a pointer to a member function, cast it to its
Derivedversion.Forward everything else unchanged.
-
template<typename
Derived, typenameReturn, typenameClass, typename ...Args>
automethod_adaptor(Return (Class::* pmf)(Args...)) -> Return (Derived::*)(Args...)
-
template<typename ...
Args>
detail::initimpl::constructor<Args...>init() Binds an existing constructor taking arguments Args…
-
template<typename ...
Args>
detail::initimpl::alias_constructor<Args...>init_alias() Like
init<Args...>(), but the instance is always constructed through the alias class (even when not inheriting on the Python side).
-
template<typename
Func, typenameRet= detail::initimpl::factory<Func>>
Retinit(Func &&f) Binds a factory function as a constructor.
-
template<typename
CFunc, typenameAFunc, typenameRet= detail::initimpl::factory<CFunc, AFunc>>
Retinit(CFunc &&c, AFunc &&a) Dual-argument factory function: the first function is called when no alias is needed, the second when an alias is needed (i.e.
due to python-side inheritance). Arguments must be identical.
-
template<typename
GetState, typenameSetState>
detail::initimpl::pickle_factory<GetState, SetState>pickle(GetState &&g, SetState &&s) Binds pickling functions
__getstate__and__setstate__and ensures that the type returned by__getstate__is the same as the argument accepted by__setstate__.
-
inline PYBIND11_NOINLINE void keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret)
-
inline std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache (PyTypeObject *type)
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameIterator, typenameSentinel, typenameValueType= decltype(*std::declval<Iterator>()), typename ...Extra>
iteratormake_iterator(Iterator first, Sentinel last, Extra&&... extra) Makes a python iterator from a first and past-the-end C++ InputIterator.
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameIterator, typenameSentinel, typenameKeyType= decltype((*std::declval<Iterator>()).first), typename ...Extra>
iteratormake_key_iterator(Iterator first, Sentinel last, Extra&&... extra) Makes an python iterator over the keys (
.first) of a iterator over pairs from a first and past-the-end InputIterator.
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameType, typename ...Extra>
iteratormake_iterator(Type &value, Extra&&... extra) Makes an iterator over values of an stl container or other container supporting
std::begin()/std::end()
-
template<return_value_policy
Policy= return_value_policy::reference_internal, typenameType, typename ...Extra>
iteratormake_key_iterator(Type &value, Extra&&... extra) Makes an iterator over the keys (
.first) of a stl map-like container supportingstd::begin()/std::end()
-
template<typename
InputType, typenameOutputType>
voidimplicitly_convertible()
-
template<typename
ExceptionTranslator>
voidregister_exception_translator(ExceptionTranslator &&translator)
-
template<typename
CppException>
exception<CppException> &get_exception_object()
-
template<typename
CppException>
exception<CppException> ®ister_exception(handle scope, const char *name, PyObject *base = PyExc_Exception) Registers a Python exception in
mof the givennameand installs an exception translator to translate the C++ exception to the created Python exception using the exceptions what() method.This is intended for simple exception translations; for more complex translation, register the exception object and translator directly.
-
inline PYBIND11_NOINLINE void print (tuple args, dict kwargs)
-
template<return_value_policy
policy= return_value_policy::automatic_reference, typename ...Args>
voidprint(Args&&... args)
-
inline function
get_type_overload(const void *this_ptr, const detail::type_info *this_type, const char *name)
-
template<class
T>
functionget_overload(const T *this_ptr, const char *name) Try to retrieve a python method by the provided name from the instance pointed to by the this_ptr.
:this_ptr: The pointer to the object the overload should be retrieved for. This should be the first non-trampoline class encountered in the inheritance chain. :name: The name of the overloaded Python method to retrieve. :return: The Python method by this name from the object or an empty function wrapper.
-
-
file
pytypes.h - #include “detail/common.h”#include “buffer_info.h”#include <utility>#include <type_traits>
Defines
-
PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun)¶
-
PYBIND11_OBJECT_CVT(Name, Parent, CheckFun, ConvertFun)¶
-
PYBIND11_OBJECT(Name, Parent, CheckFun)¶
-
PYBIND11_OBJECT_DEFAULT(Name, Parent, CheckFun)¶
-
PYBIND11_MATH_OPERATOR_UNARY(op, fn)¶
-
PYBIND11_MATH_OPERATOR_BINARY(op, fn)¶
Typedefs
-
using
obj_attr_accessor= accessor<accessor_policies::obj_attr>¶
-
using
str_attr_accessor= accessor<accessor_policies::str_attr>¶
-
using
item_accessor= accessor<accessor_policies::generic_item>¶
-
using
sequence_accessor= accessor<accessor_policies::sequence_item>¶
-
using
list_accessor= accessor<accessor_policies::list_item>¶
-
using
tuple_accessor= accessor<accessor_policies::tuple_item>¶
-
using
is_pyobject= std::is_base_of<pyobject_tag, remove_reference_t<T>>¶
-
using
tuple_iterator= generic_iterator<iterator_policies::sequence_fast_readonly>¶
-
using
list_iterator= generic_iterator<iterator_policies::sequence_fast_readonly>¶
-
using
sequence_iterator= generic_iterator<iterator_policies::sequence_slow_readwrite>¶
-
using
dict_iterator= generic_iterator<iterator_policies::dict_readonly>¶
-
using
is_s_unpacking= std::is_same<args_proxy, T>¶
-
using
is_ds_unpacking= std::is_same<kwargs_proxy, T>¶
-
using
is_positional= satisfies_none_of<T, is_keyword, is_s_unpacking, is_ds_unpacking>¶
-
using
is_keyword_or_ds= satisfies_any_of<T, is_keyword, is_ds_unpacking>¶
Functions
-
template<typename
T>
Treinterpret_borrow(handle h)¶ Declare that a
handleorPyObject *is a certain type and borrow the reference.The target type
Tmust beobjector one of its derived classes. The function doesn’t do any conversions or checks. It’s up to the user to make sure that the target type is correct... code-block:: cpp
or py::tuple t = reinterpret_borrow<py::tuple>(p); // <PyObject *p = PyList_GetItem(obj, index); py::object o = reinterpret_borrow<py::object>(p);
pmust be already be atuple
-
template<typename
T>
Treinterpret_steal(handle h)¶ Like
reinterpret_borrow, but steals the reference... code-block:: cpp
PyObject *p = PyObject_Str(obj); py::str s = reinterpret_steal<py::str>(p); // <
pmust be already be astr
-
inline std::string
error_string()¶
-
template<typename
T, detail::enable_if_t<std::is_base_of<object, T>::value, int> = 0>
boolisinstance(handle obj) Return true if
objis an instance ofT.Type
Tmust be a subclass ofobjector a class which was exposed to Python aspy::class_<T>.
-
inline bool
hasattr(handle obj, const char *name)
-
inline void
delattr(handle obj, const char *name)
-
template<typename
T, enable_if_t<is_pyobject<T>::value, int> = 0>
autoobject_or_cast(T &&o) -> decltype(std::forward<T>(o))¶
-
template<typename
T, enable_if_t<!is_pyobject<T>::value, int> = 0>
objectobject_or_cast(T &&o)
-
inline bool
PyIterable_Check(PyObject *obj)¶
-
inline bool
PyNone_Check(PyObject *o)¶
-
inline bool
PyUnicode_Check_Permissive(PyObject *o)¶
-
inline bool
PyStaticMethod_Check(PyObject *o)¶
-
template<typename
Unsigned>
Unsignedas_unsigned(PyObject *o)
-
-
file
pytypes.h - #include “detail/common.h”#include “buffer_info.h”#include <utility>#include <type_traits>
Defines
-
PYBIND11_OBJECT_COMMON(Name, Parent, CheckFun)
-
PYBIND11_OBJECT_CVT(Name, Parent, CheckFun, ConvertFun)
-
PYBIND11_OBJECT(Name, Parent, CheckFun)
-
PYBIND11_OBJECT_DEFAULT(Name, Parent, CheckFun)
-
PYBIND11_MATH_OPERATOR_UNARY(op, fn)
-
PYBIND11_MATH_OPERATOR_BINARY(op, fn)
Typedefs
-
using
obj_attr_accessor= accessor<accessor_policies::obj_attr>
-
using
str_attr_accessor= accessor<accessor_policies::str_attr>
-
using
item_accessor= accessor<accessor_policies::generic_item>
-
using
sequence_accessor= accessor<accessor_policies::sequence_item>
-
using
list_accessor= accessor<accessor_policies::list_item>
-
using
tuple_accessor= accessor<accessor_policies::tuple_item>
-
using
is_pyobject= std::is_base_of<pyobject_tag, remove_reference_t<T>>
-
using
tuple_iterator= generic_iterator<iterator_policies::sequence_fast_readonly>
-
using
list_iterator= generic_iterator<iterator_policies::sequence_fast_readonly>
-
using
sequence_iterator= generic_iterator<iterator_policies::sequence_slow_readwrite>
-
using
dict_iterator= generic_iterator<iterator_policies::dict_readonly>
-
using
is_keyword= std::is_base_of<arg, T> Python argument categories (using PEP 448 terms)
-
using
is_s_unpacking= std::is_same<args_proxy, T>
-
using
is_ds_unpacking= std::is_same<kwargs_proxy, T>
-
using
is_positional= satisfies_none_of<T, is_keyword, is_s_unpacking, is_ds_unpacking>
-
using
is_keyword_or_ds= satisfies_any_of<T, is_keyword, is_ds_unpacking>
Functions
-
inline bool
isinstance_generic(handle obj, const std::type_info &tp)
-
template<typename
T>
Treinterpret_borrow(handle h) Declare that a
handleorPyObject *is a certain type and borrow the reference.The target type
Tmust beobjector one of its derived classes. The function doesn’t do any conversions or checks. It’s up to the user to make sure that the target type is correct... code-block:: cpp
or py::tuple t = reinterpret_borrow<py::tuple>(p); // <PyObject *p = PyList_GetItem(obj, index); py::object o = reinterpret_borrow<py::object>(p);
pmust be already be atuple
-
template<typename
T>
Treinterpret_steal(handle h) Like
reinterpret_borrow, but steals the reference... code-block:: cpp
PyObject *p = PyObject_Str(obj); py::str s = reinterpret_steal<py::str>(p); // <
pmust be already be astr
-
inline std::string
error_string()
-
template<typename
T, detail::enable_if_t<std::is_base_of<object, T>::value, int> = 0>
boolisinstance(handle obj) Return true if
objis an instance ofT.Type
Tmust be a subclass ofobjector a class which was exposed to Python aspy::class_<T>.
-
template<typename
T, detail::enable_if_t<!std::is_base_of<object, T>::value, int> = 0>
boolisinstance(handle obj)¶
-
inline bool
hasattr(handle obj, const char *name)
-
inline void
delattr(handle obj, const char *name)
-
template<typename
T, enable_if_t<is_pyobject<T>::value, int> = 0>
autoobject_or_cast(T &&o) -> decltype(std::forward<T>(o))
-
template<typename
T, enable_if_t<!is_pyobject<T>::value, int> = 0>
objectobject_or_cast(T &&o)
-
inline handle
object_or_cast(PyObject *ptr)
-
inline bool
PyIterable_Check(PyObject *obj)
-
inline bool
PyNone_Check(PyObject *o)
-
inline bool
PyUnicode_Check_Permissive(PyObject *o)
-
inline bool
PyStaticMethod_Check(PyObject *o)
-
template<typename
Unsigned>
Unsignedas_unsigned(PyObject *o)
-
-
file
stl.h - #include “pybind11.h”#include <set>#include <unordered_set>#include <map>#include <unordered_map>#include <iostream>#include <list>#include <deque>#include <valarray>
Typedefs
-
using
forwarded_type= conditional_t<std::is_lvalue_reference<T>::value, remove_reference_t<U>&, remove_reference_t<U>&&>¶ Extracts an const lvalue reference or rvalue reference for U based on the type of T (e.g.
for forwarding a container element). Typically used indirect via forwarded_type(), below.
-
using
-
file
stl.h - #include “pybind11.h”#include <set>#include <unordered_set>#include <map>#include <unordered_map>#include <iostream>#include <list>#include <deque>#include <valarray>
Typedefs
-
using
forwarded_type= conditional_t<std::is_lvalue_reference<T>::value, remove_reference_t<U>&, remove_reference_t<U>&&> Extracts an const lvalue reference or rvalue reference for U based on the type of T (e.g.
for forwarding a container element). Typically used indirect via forwarded_type(), below.
Functions
-
template<typename
T, typenameU>
forwarded_type<T, U>forward_like(U &&u) Forwards a value U as rvalue or lvalue according to whether T is rvalue or lvalue; typically used for forwarding a container’s elements.
-
inline std::ostream &
operator<<(std::ostream &os, const handle &obj)
-
using
-
file
stl_bind.h - #include “detail/common.h”#include “operators.h”#include <algorithm>#include <sstream>
Typedefs
Functions
-
template<typename
Vector, typenameClass_>
voidvector_if_copy_constructible(enable_if_t<is_copy_constructible<Vector>::value, Class_> &cl)¶
-
template<typename
Vector, typenameClass_>
voidvector_if_equal_operator(enable_if_t<is_comparable<Vector>::value, Class_> &cl)¶
-
template<typename
Vector, typenameClass_>
voidvector_modifiers(enable_if_t<is_copy_constructible<typename Vector::value_type>::value, Class_> &cl)¶
-
template<typename
Vector, typenameClass_>
voidvector_accessor(enable_if_t<!vector_needs_copy<Vector>::value, Class_> &cl)¶
-
template<typename
Vector, typenameClass_>
voidvector_accessor(enable_if_t<vector_needs_copy<Vector>::value, Class_> &cl)¶
-
template<typename
Vector, typenameClass_>
autovector_if_insertion_operator(Class_ &cl, std::string const &name) -> decltype(std::declval<std::ostream&>() << std::declval<typename Vector::value_type>(), void())¶
-
template<typename
Vector, typenameClass_, typename ...Args>
enable_if_t<detail::any_of<std::is_same<Args, buffer_protocol>...>::value>vector_buffer(Class_ &cl)¶
-
template<typename
Vector, typenameClass_, typename ...Args>
enable_if_t<!detail::any_of<std::is_same<Args, buffer_protocol>...>::value>vector_buffer(Class_&)¶
-
template<typename
Vector, typenameholder_type= std::unique_ptr<Vector>, typename ...Args>
class_<Vector, holder_type>bind_vector(handle scope, std::string const &name, Args&&... args)¶
-
template<typename
Map, typenameClass_>
voidmap_assignment(enable_if_t<is_copy_assignable<typename Map::mapped_type>::value, Class_> &cl)¶
-
template<typename
Map, typenameClass_>
voidmap_assignment(enable_if_t<!is_copy_assignable<typename Map::mapped_type>::value && is_copy_constructible<typename Map::mapped_type>::value, Class_> &cl)¶
-
template<typename
-
file
stl_bind.h - #include “detail/common.h”#include “operators.h”#include <algorithm>#include <sstream>
Typedefs
-
using
vector_needs_copy= negation<std::is_same<decltype(std::declval<Vector>()[typename Vector::size_type()]), typename Vector::value_type&>>
Functions
-
template<typename, typename, typename ...
Args>
voidvector_if_copy_constructible(const Args&...)
-
template<typename, typename, typename ...
Args>
voidvector_if_equal_operator(const Args&...)
-
template<typename, typename, typename ...
Args>
voidvector_if_insertion_operator(const Args&...)
-
template<typename, typename, typename ...
Args>
voidvector_modifiers(const Args&...)
-
template<typename
Vector, typenameClass_>
voidvector_if_copy_constructible(enable_if_t<is_copy_constructible<Vector>::value, Class_> &cl)
-
template<typename
Vector, typenameClass_>
voidvector_if_equal_operator(enable_if_t<is_comparable<Vector>::value, Class_> &cl)
-
template<typename
Vector, typenameClass_>
voidvector_modifiers(enable_if_t<is_copy_constructible<typename Vector::value_type>::value, Class_> &cl)
-
template<typename
Vector, typenameClass_>
voidvector_accessor(enable_if_t<!vector_needs_copy<Vector>::value, Class_> &cl)
-
template<typename
Vector, typenameClass_>
voidvector_accessor(enable_if_t<vector_needs_copy<Vector>::value, Class_> &cl)
-
template<typename
Vector, typenameClass_>
autovector_if_insertion_operator(Class_ &cl, std::string const &name) -> decltype(std::declval<std::ostream&>() << std::declval<typename Vector::value_type>(), void())
-
template<typename
Vector, typenameClass_, typename ...Args>
enable_if_t<detail::any_of<std::is_same<Args, buffer_protocol>...>::value>vector_buffer(Class_ &cl)
-
template<typename
Vector, typenameClass_, typename ...Args>
enable_if_t<!detail::any_of<std::is_same<Args, buffer_protocol>...>::value>vector_buffer(Class_&)
-
template<typename
Vector, typenameholder_type= std::unique_ptr<Vector>, typename ...Args>
class_<Vector, holder_type>bind_vector(handle scope, std::string const &name, Args&&... args)
-
template<typename, typename, typename ...
Args>
voidmap_if_insertion_operator(const Args&...)
-
template<typename, typename, typename ...
Args>
voidmap_assignment(const Args&...)
-
template<typename
Map, typenameClass_>
voidmap_assignment(enable_if_t<is_copy_assignable<typename Map::mapped_type>::value, Class_> &cl)
-
template<typename
Map, typenameClass_>
voidmap_assignment(enable_if_t<!is_copy_assignable<typename Map::mapped_type>::value && is_copy_constructible<typename Map::mapped_type>::value, Class_> &cl)
-
using
-
file
yaml_cpp_fwd.hpp - #include <yaml-cpp/yaml.h>#include “yaml_utils/yaml_eigen.hpp”#include “yaml_utils/yaml_tools.hpp”
-
file
yaml_cpp_fwd.hpp - #include <yaml-cpp/yaml.h>#include “yaml_utils/yaml_eigen.hpp”#include “yaml_utils/yaml_tools.hpp”
-
file
yaml_eigen.hpp - #include <type_traits>#include <iomanip>#include <Eigen/Eigen>#include <yaml-cpp/yaml.h>
-
file
yaml_eigen.hpp - #include <type_traits>#include <iomanip>#include <Eigen/Eigen>#include <yaml-cpp/yaml.h>
-
file
yaml_tools.hpp - #include “yaml_utils/yaml_eigen.hpp”
-
file
yaml_tools.hpp - #include “yaml_utils/yaml_eigen.hpp”
-
file
gmock-all.cc - #include “gmock/gmock.h”#include “src/gmock-cardinalities.cc”#include “src/gmock-internal-utils.cc”#include “src/gmock-matchers.cc”#include “src/gmock-spec-builders.cc”#include “src/gmock.cc”
-
file
gmock-cardinalities.cc - #include “gmock/gmock-cardinalities.h”#include <limits.h>#include <ostream>#include <sstream>#include <string>#include “gmock/internal/gmock-internal-utils.h”#include “gtest/gtest.h”
Variables
-
const int
min_
-
const int
max_
-
const int
-
file
gmock-internal-utils.cc - #include “gmock/internal/gmock-internal-utils.h”#include <ctype.h>#include <ostream>#include <string>#include “gmock/gmock.h”#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”
-
file
gmock-matchers.cc - #include “gmock/gmock-matchers.h”#include <string.h>#include <iostream>#include <sstream>#include <string>
-
file
gmock-spec-builders.cc - #include “gmock/gmock-spec-builders.h”#include <stdlib.h>#include <iostream>#include <map>#include <memory>#include <set>#include <string>#include <vector>#include “gmock/gmock.h”#include “gtest/gtest.h”#include “gtest/internal/gtest-port.h”
Variables
-
const char *
first_used_file
-
int
first_used_line
-
::std::string
first_used_test_suite
-
::std::string
first_used_test
-
bool
leakable
-
FunctionMockers
function_mockers
-
StateMap
states_
-
const char *
-
file
gmock.cc - #include “gmock/gmock.h”#include “gmock/internal/gmock-port.h”
-
file
gmock_main.cc - #include <iostream>#include “gmock/gmock.h”#include “gtest/gtest.h”
Functions
-
GTEST_API_ int main (int argc, char **argv)
-
-
file
gmock-actions_test.cc - #include “gmock/gmock-actions.h”#include <algorithm>#include <iterator>#include <memory>#include <string>#include <type_traits>#include “gmock/gmock.h”#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”#include “gtest/gtest-spi.h”
-
file
gmock-cardinalities_test.cc - #include “gmock/gmock.h”#include “gtest/gtest.h”#include “gtest/gtest-spi.h”
-
file
gmock-function-mocker_test.cc - #include “gmock/gmock-function-mocker.h”#include <functional>#include <map>#include <string>#include <type_traits>#include “gmock/gmock.h”#include “gtest/gtest.h”
Defines
-
MY_MOCK_METHODS1_
-
LEGACY_MY_MOCK_METHODS1_
-
MY_MOCK_METHODS2_
-
-
file
gmock-internal-utils_test.cc - #include “gmock/internal/gmock-internal-utils.h”#include <stdlib.h>#include <cstdint>#include <map>#include <memory>#include <sstream>#include <string>#include <vector>#include “gmock/gmock.h”#include “gmock/internal/gmock-port.h”#include “gtest/gtest-spi.h”#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Defines
-
GTEST_IMPLEMENTATION_
Variables
-
std::string
original_verbose_
-
-
file
gmock-matchers_test.cc - #include “gmock/gmock-matchers.h”#include <string.h>#include <time.h>#include <array>#include <cstdint>#include <deque>#include <forward_list>#include <functional>#include <iostream>#include <iterator>#include <limits>#include <list>#include <map>#include <memory>#include <set>#include <sstream>#include <string>#include <type_traits>#include <unordered_map>#include <unordered_set>#include <utility>#include <vector>#include “gmock/gmock-more-matchers.h”#include “gmock/gmock.h”#include “gtest/gtest-spi.h”#include “gtest/gtest.h”
Variables
-
int
rhs_
-
static const int
kInt= 1
-
int
value_
-
int
value
-
int
i
-
char
c_
-
int
i_
-
int
member_1
-
std::string
member_2
-
int
threshold_
-
int
number_
-
const Bits
max_ulps_
-
const Bits
zero_bits_
-
const Bits
one_bits_
-
const Bits
infinity_bits_
-
const RawType
close_to_positive_zero_
-
const RawType
close_to_negative_zero_
-
const RawType
further_from_negative_zero_
-
const RawType
close_to_one_
-
const RawType
further_from_one_
-
const RawType
infinity_
-
const RawType
close_to_infinity_
-
const RawType
further_from_infinity_
-
const RawType
max_
-
const RawType
nan1_
-
const RawType
nan2_
-
T *
val_
-
int
x
-
const double
y
-
Uncopyable
z
-
const char *
p
-
char
ch
-
int
n_
-
std::string
s_
-
static double
x_
-
int
k_
-
int
divider_
-
std::list<value_type>::iterator
pos_
-
mutable std::list<value_type>
remainder_
-
const Graph *
graph_
-
std::vector<size_t>
lhs_used_
-
std::vector<size_t>
rhs_used_
-
ElementMatcherPairs
matches_
-
ElementMatcherPairs
best_so_far_
-
bool
has_value_
-
bool
has_int_
-
int
index_
-
int
-
file
gmock-more-actions_test.cc - #include “gmock/gmock-more-actions.h”#include <functional>#include <memory>#include <sstream>#include <string>#include “gmock/gmock.h”#include “gtest/gtest-spi.h”#include “gtest/gtest.h”
-
file
gmock-nice-strict_test.cc - #include “gmock/gmock-nice-strict.h”#include <string>#include <utility>#include “gmock/gmock.h”#include “gtest/gtest-spi.h”#include “gtest/gtest.h”
-
file
gmock-port_test.cc - #include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”
Functions
-
TEST(DummyTest, Dummy)
-
-
file
gmock-pp-string_test.cc - #include “gmock/internal/gmock-pp.h”#include <string>#include “gmock/gmock.h”
Defines
-
EXPECT_EXPANSION(Result, Macro)
-
GMOCK_PP_INTERNAL_IS_EMPTY_TEST_1
-
JOINER_CAT(a, b)
-
JOINER(_N, _Data, _Elem)
-
-
file
gmock-pp_test.cc - #include “gmock/internal/gmock-pp.h”
Defines
-
GMOCK_TEST_REPLACE_comma_WITH_COMMA_I_comma
-
GMOCK_TEST_REPLACE_comma_WITH_COMMA(x)
-
GMOCK_PP_INTERNAL_TYPE_TEST(_i, _Data, _element)
-
GMOCK_PP_INTERNAL_VAR_TEST_1(_x)
-
GMOCK_PP_INTERNAL_VAR_TEST_2(_x, _y)
-
GMOCK_PP_INTERNAL_VAR_TEST_3(_x, _y, _z)
-
GMOCK_PP_INTERNAL_VAR_TEST(...)
-
GMOCK_PP_INTERNAL_IS_EMPTY_TEST_1
-
-
file
gmock-spec-builders_test.cc - #include “gmock/gmock-spec-builders.h”#include <memory>#include <ostream>#include <sstream>#include <string>#include “gmock/gmock.h”#include “gmock/internal/gmock-port.h”#include “gtest/gtest.h”#include “gtest/gtest-spi.h”#include “gtest/internal/gtest-port.h”
Defines
-
Method
Functions
-
int
main(int argc, char **argv)
-
-
file
gmock_all_test.cc - #include “test/gmock-actions_test.cc”#include “test/gmock-cardinalities_test.cc”#include “test/gmock-internal-utils_test.cc”#include “test/gmock-matchers_test.cc”#include “test/gmock-more-actions_test.cc”#include “test/gmock-nice-strict_test.cc”#include “test/gmock-port_test.cc”#include “test/gmock-spec-builders_test.cc”#include “test/gmock_test.cc”
-
file
gmock_ex_test.cc - #include “gmock/gmock.h”#include “gtest/gtest.h”
-
file
gmock_leak_test_.cc - #include “gmock/gmock.h”
-
file
gmock_link2_test.cc - #include “test/gmock_link_test.h”
Defines
-
LinkTest
-
-
file
gmock_link_test.cc - #include “test/gmock_link_test.h”
Defines
-
LinkTest
-
-
file
gmock_link_test.h - #include “gmock/gmock.h”#include <errno.h>#include <iostream>#include <vector>#include “gtest/gtest.h”#include “gtest/internal/gtest-port.h”
Functions
-
TEST(LinkTest, TestReturnVoid)
-
TEST(LinkTest, TestReturn)
-
TEST(LinkTest, TestReturnNull)
-
TEST(LinkTest, TestReturnRef)
-
TEST(LinkTest, TestAssign)
-
TEST(LinkTest, TestSetArgPointee)
-
TEST(LinkTest, TestSetArrayArgument)
-
TEST(LinkTest, TestSetErrnoAndReturn)
-
TEST(LinkTest, TestInvoke)
-
TEST(LinkTest, TestInvokeWithoutArgs)
-
TEST(LinkTest, TestInvokeArgument)
-
TEST(LinkTest, TestWithArg)
-
TEST(LinkTest, TestWithArgs)
-
TEST(LinkTest, TestWithoutArgs)
-
TEST(LinkTest, TestDoAll)
-
TEST(LinkTest, TestDoDefault)
-
TEST(LinkTest, TestIgnoreResult)
-
TEST(LinkTest, TestActionMacro)
-
TEST(LinkTest, TestActionPMacro)
-
TEST(LinkTest, TestActionP2Macro)
-
TEST(LinkTest, TestMatcherAnything)
-
TEST(LinkTest, TestMatcherA)
-
TEST(LinkTest, TestMatchersEq)
-
TEST(LinkTest, TestMatchersRelations)
-
TEST(LinkTest, TestMatcherNotNull)
-
TEST(LinkTest, TestMatcherIsNull)
-
TEST(LinkTest, TestMatcherRef)
-
TEST(LinkTest, TestMatcherTypedEq)
-
TEST(LinkTest, TestMatchersFloatingPoint)
-
TEST(LinkTest, TestMatcherContainsRegex)
-
TEST(LinkTest, TestMatcherMatchesRegex)
-
TEST(LinkTest, TestMatchersSubstrings)
-
TEST(LinkTest, TestMatchersStringEquality)
-
TEST(LinkTest, TestMatcherElementsAre)
-
TEST(LinkTest, TestMatcherElementsAreArray)
-
TEST(LinkTest, TestMatcherIsSubsetOf)
-
TEST(LinkTest, TestMatcherIsSupersetOf)
-
TEST(LinkTest, TestMatcherContainerEq)
-
TEST(LinkTest, TestMatcherField)
-
TEST(LinkTest, TestMatcherProperty)
-
TEST(LinkTest, TestMatcherResultOf)
-
TEST(LinkTest, TestMatcherPointee)
-
TEST(LinkTest, TestMatcherTruly)
-
TEST(LinkTest, TestMatcherAllOf)
-
TEST(LinkTest, TestMatcherAnyOf)
-
TEST(LinkTest, TestMatcherNot)
-
TEST(LinkTest, TestMatcherCast)
-
-
file
gmock_output_test_.cc - #include “gmock/gmock.h”#include <stdio.h>#include <string>#include “gtest/gtest.h”
Functions
-
TEST_F(GMockOutputTest, ExpectedCall)
-
TEST_F(GMockOutputTest, ExpectedCallToVoidFunction)
-
TEST_F(GMockOutputTest, ExplicitActionsRunOut)
-
TEST_F(GMockOutputTest, UnexpectedCall)
-
TEST_F(GMockOutputTest, UnexpectedCallToVoidFunction)
-
TEST_F(GMockOutputTest, ExcessiveCall)
-
TEST_F(GMockOutputTest, ExcessiveCallToVoidFunction)
-
TEST_F(GMockOutputTest, UninterestingCall)
-
TEST_F(GMockOutputTest, UninterestingCallToVoidFunction)
-
TEST_F(GMockOutputTest, RetiredExpectation)
-
TEST_F(GMockOutputTest, UnsatisfiedPrerequisite)
-
TEST_F(GMockOutputTest, UnsatisfiedPrerequisites)
-
TEST_F(GMockOutputTest, UnsatisfiedWith)
-
TEST_F(GMockOutputTest, UnsatisfiedExpectation)
-
TEST_F(GMockOutputTest, MismatchArguments)
-
TEST_F(GMockOutputTest, MismatchWith)
-
TEST_F(GMockOutputTest, MismatchArgumentsAndWith)
-
TEST_F(GMockOutputTest, UnexpectedCallWithDefaultAction)
-
TEST_F(GMockOutputTest, ExcessiveCallWithDefaultAction)
-
TEST_F(GMockOutputTest, UninterestingCallWithDefaultAction)
-
TEST_F(GMockOutputTest, ExplicitActionsRunOutWithDefaultAction)
-
TEST_F(GMockOutputTest, CatchesLeakedMocks)
-
MATCHER_P2 (IsPair, first, second, "")
-
TEST_F(GMockOutputTest, PrintsMatcher)
-
void
TestCatchesLeakedMocksInAdHocTests()
-
int
main(int argc, char **argv)
-
-
file
gmock_stress_test.cc - #include “gmock/gmock.h”#include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
gmock_test.cc - #include “gmock/gmock.h”#include <string>#include “gtest/gtest.h”#include “gtest/internal/custom/gtest.h”
Functions
-
template<typename
Char, intM, intN>
voidTestInitGoogleMock(const Char *(&argv)[M], const Char *(&new_argv)[N], const ::std::string &expected_gmock_verbose)
-
TEST(InitGoogleMockTest, ParsesInvalidCommandLine)
-
TEST(InitGoogleMockTest, ParsesEmptyCommandLine)
-
TEST(InitGoogleMockTest, ParsesSingleFlag)
-
TEST(InitGoogleMockTest, ParsesMultipleFlags)
-
TEST(InitGoogleMockTest, ParsesUnrecognizedFlag)
-
TEST(InitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag)
-
TEST(WideInitGoogleMockTest, ParsesInvalidCommandLine)
-
TEST(WideInitGoogleMockTest, ParsesEmptyCommandLine)
-
TEST(WideInitGoogleMockTest, ParsesSingleFlag)
-
TEST(WideInitGoogleMockTest, ParsesMultipleFlags)
-
TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag)
-
TEST(WideInitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag)
-
TEST(FlagTest, IsAccessibleInCode)
-
template<typename
-
file
prime_tables.h - #include <algorithm>
-
file
sample1.cc - #include “sample1.h”
Functions
-
int
Factorial(int n)
-
bool
IsPrime(int n)
-
int
-
file
sample1.h Functions
-
int
Factorial(int n)
-
bool
IsPrime(int n)
-
int
-
file
sample10_unittest.cc - #include <stdio.h>#include <stdlib.h>#include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
sample1_unittest.cc - #include <limits.h>#include “sample1.h”#include “gtest/gtest.h”
-
file
sample2.cc - #include “sample2.h”#include <string.h>
-
file
sample2.h - #include <string.h>
-
file
sample2_unittest.cc - #include “sample2.h”#include “gtest/gtest.h”
-
file
sample3-inl.h - #include <stddef.h>
-
file
sample3_unittest.cc - #include “sample3-inl.h”#include “gtest/gtest.h”
-
file
sample4.cc - #include <stdio.h>#include “sample4.h”
-
file
sample4.h
-
file
sample4_unittest.cc - #include “sample4.h”#include “gtest/gtest.h”
-
file
sample5_unittest.cc - #include <limits.h>#include <time.h>#include “gtest/gtest.h”#include “sample1.h”#include “sample3-inl.h”
-
file
sample6_unittest.cc - #include “prime_tables.h”#include “gtest/gtest.h”
-
file
sample7_unittest.cc - #include “prime_tables.h”#include “gtest/gtest.h”
-
file
sample8_unittest.cc - #include “prime_tables.h”#include “gtest/gtest.h”
-
file
sample9_unittest.cc - #include <stdio.h>#include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
gtest-all.cc - #include “gtest/gtest.h”#include “src/gtest.cc”#include “src/gtest-death-test.cc”#include “src/gtest-filepath.cc”#include “src/gtest-matchers.cc”#include “src/gtest-port.cc”#include “src/gtest-printers.cc”#include “src/gtest-test-part.cc”#include “src/gtest-typed-test.cc”
-
file
gtest-death-test.cc - #include “gtest/gtest-death-test.h”#include <functional>#include <utility>#include “gtest/internal/gtest-port.h”#include “gtest/internal/custom/gtest.h”#include “gtest/gtest-message.h”#include “gtest/internal/gtest-string.h”#include “src/gtest-internal-inl.h”
-
file
gtest-filepath.cc - #include “gtest/internal/gtest-filepath.h”#include <stdlib.h>#include “gtest/internal/gtest-port.h”#include “gtest/gtest-message.h”#include <limits.h>#include <climits>#include “gtest/internal/gtest-string.h”
Defines
-
GTEST_PATH_MAX_
-
-
file
gtest-internal-inl.h - #include <errno.h>#include <stddef.h>#include <stdlib.h>#include <string.h>#include <algorithm>#include <cstdint>#include <memory>#include <string>#include <vector>#include “gtest/internal/gtest-port.h”#include “gtest/gtest.h”#include “gtest/gtest-spi.h”
Functions
-
GTEST_DISABLE_MSC_WARNINGS_PUSH_ (4251) namespace testing
-
-
file
gtest-matchers.cc - #include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-port.h”#include “gtest/gtest-matchers.h”#include <string>
-
file
gtest-port.cc - #include “gtest/internal/gtest-port.h”#include <limits.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <cstdint>#include <fstream>#include <memory>#include <unistd.h>#include “gtest/gtest-spi.h”#include “gtest/gtest-message.h”#include “gtest/internal/gtest-internal.h”#include “gtest/internal/gtest-string.h”#include “src/gtest-internal-inl.h”
-
file
gtest-printers.cc - #include “gtest/gtest-printers.h”#include <stdio.h>#include <cctype>#include <cstdint>#include <cwchar>#include <ostream>#include <string>#include <type_traits>#include “gtest/internal/gtest-port.h”#include “src/gtest-internal-inl.h”
-
file
gtest-test-part.cc - #include “gtest/gtest-test-part.h”#include “gtest/internal/gtest-port.h”#include “src/gtest-internal-inl.h”
-
file
gtest-typed-test.cc - #include “gtest/gtest-typed-test.h”#include “gtest/gtest.h”
-
file
gtest.cc - #include “gtest/gtest.h”#include “gtest/internal/custom/gtest.h”#include “gtest/gtest-spi.h”#include <ctype.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <time.h>#include <wchar.h>#include <wctype.h>#include <algorithm>#include <chrono>#include <cmath>#include <cstdint>#include <iomanip>#include <limits>#include <list>#include <map>#include <ostream>#include <sstream>#include <vector>#include <sys/time.h>#include <unistd.h>#include “src/gtest-internal-inl.h”
Defines
-
GTEST_REPEATER_METHOD_(Name, Type)
-
GTEST_REVERSE_REPEATER_METHOD_(Name, Type)
Variables
-
const CodeLocation
loc_
-
const std::string
error_message_
-
const bool
as_error_
-
IdMap
ids_
-
size_t
left_start_
-
size_t
right_start_
-
size_t
adds_
-
size_t
removes_
-
size_t
common_
-
std::list<std::pair<char, const char*>>
hunk_
-
std::list<std::pair<char, const char*>>
hunk_adds_
-
std::list<std::pair<char, const char*>>
hunk_removes_
-
std::string
name_
-
-
file
gtest_main.cc - #include <cstdio>#include “gtest/gtest.h”
Functions
-
GTEST_API_ int main (int argc, char **argv)
-
-
file
googletest-break-on-failure-unittest_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-catch-exceptions-test_.cc - #include <stdio.h>#include <stdlib.h>#include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-color-test_.cc - #include <stdio.h>#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Functions
-
TEST(GTestColorTest, Dummy)
-
int
main(int argc, char **argv)
-
-
file
googletest-death-test-test.cc - #include “gtest/gtest-death-test.h”#include “gtest/gtest.h”#include “gtest/internal/gtest-filepath.h”
-
file
googletest-death-test_ex_test.cc - #include “gtest/gtest-death-test.h”#include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-env-var-test_.cc - #include <iostream>#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-failfast-unittest_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-filepath-test.cc - #include “gtest/internal/gtest-filepath.h”#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Variables
-
FilePath
testdata_path_
-
FilePath
testdata_file_
-
FilePath
unique_file0_
-
FilePath
unique_file1_
-
FilePath
-
file
googletest-filter-unittest_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-global-environment-unittest_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-list-tests-unittest_.cc - #include “gtest/gtest.h”
Typedefs
-
typedef testing::Types<VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName, int*, MyArray<bool, 42>>
MyTypes
Functions
-
TEST(Foo, Bar1)
-
TEST(Foo, Bar2)
-
TEST(Foo, DISABLED_Bar3)
-
TEST(Abc, Xyz)
-
TEST(Abc, Def)
-
TEST(FooBar, Baz)
-
TEST_F(FooTest, Test1)
-
TEST_F(FooTest, DISABLED_Test2)
-
TEST_F(FooTest, Test3)
-
TEST(FooDeathTest, Test1)
-
void
PrintTo(const MyType &x, std::ostream *os)
-
TEST_P(ValueParamTest, TestA)
-
TEST_P(ValueParamTest, TestB)
-
INSTANTIATE_TEST_SUITE_P (MyInstantiation, ValueParamTest, testing::Values(MyType("one line"), MyType("two\ines"), MyType("a very\oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong line")))
-
TYPED_TEST(TypedTest, TestA)
-
TYPED_TEST(TypedTest, TestB)
-
TYPED_TEST_SUITE_P(TypeParamTest)
-
TYPED_TEST_P(TypeParamTest, TestA)
-
TYPED_TEST_P(TypeParamTest, TestB)
-
REGISTER_TYPED_TEST_SUITE_P(TypeParamTest, TestA, TestB)
-
INSTANTIATE_TYPED_TEST_SUITE_P(My, TypeParamTest, MyTypes)
-
int
main(int argc, char **argv)
-
typedef testing::Types<VeryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogName, int*, MyArray<bool, 42>>
-
file
googletest-listener-test.cc - #include <vector>#include “gtest/gtest.h”#include “gtest/internal/custom/gtest.h”
Functions
-
void
VerifyResults(const std::vector<std::string> &data, const char *const *expected_data, size_t expected_data_size)
-
int
main(int argc, char **argv)
Variables
-
std::vector<std::string> *
g_events= nullptr
-
void
-
file
googletest-message-test.cc - #include “gtest/gtest-message.h”#include “gtest/gtest.h”
-
file
googletest-options-test.cc - #include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Variables
-
FilePath
original_working_dir_
-
FilePath
-
file
googletest-output-test_.cc - #include “gtest/gtest-spi.h”#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”#include <stdlib.h>
Typedefs
-
using
NoTests= ParamTest
-
typedef testing::Types<char, int>
TypesForTestWithNames
-
typedef testing::Types<unsigned char, unsigned int>
UnsignedTypes
Functions
-
void
TestEq1(int x)
-
void
TryTestSubroutine()
-
TEST(PassingTest, PassingTest1)
-
TEST(PassingTest, PassingTest2)
-
TEST_P(FailingParamTest, Fails)
-
INSTANTIATE_TEST_SUITE_P (PrintingFailingParams, FailingParamTest, testing::Values(2))
-
TEST_P(EmptyBasenameParamInst, Passes)
-
INSTANTIATE_TEST_SUITE_P (, EmptyBasenameParamInst, testing::Values(1))
-
TEST(NonfatalFailureTest, EscapesStringOperands)
-
TEST(NonfatalFailureTest, DiffForLongStrings)
-
TEST(FatalFailureTest, FatalFailureInSubroutine)
-
TEST(FatalFailureTest, FatalFailureInNestedSubroutine)
-
TEST(FatalFailureTest, NonfatalFailureInSubroutine)
-
TEST(LoggingTest, InterleavingLoggingAndAssertions)
-
void
SubWithoutTrace(int n)
-
void
SubWithTrace(int n)
-
TEST(SCOPED_TRACETest, AcceptedValues)
-
TEST(SCOPED_TRACETest, ObeysScopes)
-
TEST(SCOPED_TRACETest, WorksInLoop)
-
TEST(SCOPED_TRACETest, WorksInSubroutine)
-
TEST(SCOPED_TRACETest, CanBeNested)
-
TEST(SCOPED_TRACETest, CanBeRepeated)
-
TEST(ScopedTraceTest, WithExplicitFileAndLine)
-
TEST(DisabledTestsWarningTest, DISABLED_AlsoRunDisabledTestsFlagSuppressesWarning)
-
void
AdHocTest()
-
int
RunAllTests()
-
TEST_F(NonFatalFailureInFixtureConstructorTest, FailureInConstructor)
-
TEST_F(FatalFailureInFixtureConstructorTest, FailureInConstructor)
-
TEST_F(NonFatalFailureInSetUpTest, FailureInSetUp)
-
TEST_F(FatalFailureInSetUpTest, FailureInSetUp)
-
TEST(AddFailureAtTest, MessageContainsSpecifiedFileAndLineNumber)
-
TEST(GtestFailAtTest, MessageContainsSpecifiedFileAndLineNumber)
-
TEST_F(TEST_F_before_TEST_in_same_test_case, DefinedUsingTEST_F)
-
TEST(TEST_F_before_TEST_in_same_test_case, DefinedUsingTESTAndShouldFail)
-
TEST(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST)
-
TEST_F(TEST_before_TEST_F_in_same_test_case, DefinedUsingTEST_FAndShouldFail)
-
TEST(ExpectNonfatalFailureTest, CanReferenceGlobalVariables)
-
TEST(ExpectNonfatalFailureTest, CanReferenceLocalVariables)
-
TEST(ExpectNonfatalFailureTest, SucceedsWhenThereIsOneNonfatalFailure)
-
TEST(ExpectNonfatalFailureTest, FailsWhenThereIsNoNonfatalFailure)
-
TEST(ExpectNonfatalFailureTest, FailsWhenThereAreTwoNonfatalFailures)
-
TEST(ExpectNonfatalFailureTest, FailsWhenThereIsOneFatalFailure)
-
TEST(ExpectNonfatalFailureTest, FailsWhenStatementReturns)
-
TEST(ExpectFatalFailureTest, CanReferenceGlobalVariables)
-
TEST(ExpectFatalFailureTest, CanReferenceLocalStaticVariables)
-
TEST(ExpectFatalFailureTest, SucceedsWhenThereIsOneFatalFailure)
-
TEST(ExpectFatalFailureTest, FailsWhenThereIsNoFatalFailure)
-
void
FatalFailure()
-
TEST(ExpectFatalFailureTest, FailsWhenThereAreTwoFatalFailures)
-
TEST(ExpectFatalFailureTest, FailsWhenThereIsOneNonfatalFailure)
-
TEST(ExpectFatalFailureTest, FailsWhenStatementReturns)
-
std::string
ParamNameFunc(const testing::TestParamInfo<std::string> &info)
-
TEST_P(ParamTest, Success)
-
TEST_P(ParamTest, Failure)
-
INSTANTIATE_TEST_SUITE_P (PrintingStrings, ParamTest, testing::Values(std::string("a")), ParamNameFunc)
-
INSTANTIATE_TEST_SUITE_P (ThisIsOdd, NoTests, ::testing::Values("Hello"))
-
TEST_P(DetectNotInstantiatedTest, Used)
-
TYPED_TEST(TypedTest, Success)
-
TYPED_TEST(TypedTest, Failure)
-
TYPED_TEST_SUITE(TypedTestWithNames, TypesForTestWithNames, TypedTestNames)
-
TYPED_TEST(TypedTestWithNames, Success)
-
TYPED_TEST(TypedTestWithNames, Failure)
-
TYPED_TEST_SUITE_P(TypedTestP)
-
TYPED_TEST_P(TypedTestP, Success)
-
TYPED_TEST_P(TypedTestP, Failure)
-
REGISTER_TYPED_TEST_SUITE_P(TypedTestP, Success, Failure)
-
INSTANTIATE_TYPED_TEST_SUITE_P(Unsigned, TypedTestP, UnsignedTypes)
-
INSTANTIATE_TYPED_TEST_SUITE_P(UnsignedCustomName, TypedTestP, UnsignedTypes, TypedTestPNames)
-
TYPED_TEST_SUITE_P(DetectNotInstantiatedTypesTest)
-
TYPED_TEST_P(DetectNotInstantiatedTypesTest, Used)
-
REGISTER_TYPED_TEST_SUITE_P(DetectNotInstantiatedTypesTest, Used)
-
TEST_F(ExpectFailureTest, ExpectFatalFailure)
-
TEST_F(ExpectFailureTest, ExpectNonFatalFailure)
-
TEST_F(ExpectFailureTest, ExpectFatalFailureOnAllThreads)
-
TEST_F(ExpectFailureTest, ExpectNonFatalFailureOnAllThreads)
-
int
main(int argc, char **argv)
Variables
-
static const char
kGoldenString[] = "\"Line\0 1\"\nLine 2"
-
int
global_integer= 0
-
auto
dynamic_test
-
using
-
file
googletest-param-test-invalid-name1-test_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char *argv[])
-
int
-
file
googletest-param-test-invalid-name2-test_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char *argv[])
-
int
-
file
googletest-param-test-test.cc - #include “gtest/gtest.h”#include <algorithm>#include <iostream>#include <list>#include <set>#include <sstream>#include <string>#include <vector>#include “src/gtest-internal-inl.h”#include “test/googletest-param-test-test.h”
Defines
-
PREFIX_WITH_FOO(test_name)
-
PREFIX_WITH_MACRO(test_name)
Enums
-
enum
MyEnums Values:
-
enumerator
ENUM1
-
enumerator
ENUM2
-
enumerator
ENUM3
-
enumerator
Functions
-
template<typename
T>
::std::stringPrintValue(const T &value)
-
template<typename
T, size_tN>
voidVerifyGenerator(const ParamGenerator<T> &generator, const T (&expected_values)[N])
-
template<typename
T>
voidVerifyGeneratorIsEmpty(const ParamGenerator<T> &generator)
-
TEST(IteratorTest, ParamIteratorConformsToForwardIteratorConcept)
-
TEST(RangeTest, IntRangeWithDefaultStep)
-
TEST(RangeTest, IntRangeSingleValue)
-
TEST(RangeTest, IntRangeEmpty)
-
TEST(RangeTest, IntRangeWithCustomStep)
-
TEST(RangeTest, IntRangeWithCustomStepOverUpperBound)
-
TEST(RangeTest, WorksWithACustomType)
-
TEST(RangeTest, WorksWithACustomTypeWithDifferentIncrementType)
-
TEST(ValuesInTest, ValuesInArray)
-
TEST(ValuesInTest, ValuesInConstArray)
-
TEST(ValuesInTest, ValuesInSingleElementArray)
-
TEST(ValuesInTest, ValuesInVector)
-
TEST(ValuesInTest, ValuesInIteratorRange)
-
TEST(ValuesInTest, ValuesInSingleElementIteratorRange)
-
TEST(ValuesInTest, ValuesInEmptyIteratorRange)
-
TEST(ValuesTest, ValuesWorks)
-
TEST(ValuesTest, ValuesWorksForValuesOfCompatibleTypes)
-
TEST(ValuesTest, ValuesWorksForMaxLengthList)
-
TEST(ValuesTest, ValuesWithSingleParameter)
-
TEST(BoolTest, BoolWorks)
-
TEST(CombineTest, CombineWithTwoParameters)
-
TEST(CombineTest, CombineWithThreeParameters)
-
TEST(CombineTest, CombineWithFirstParameterSingleValue)
-
TEST(CombineTest, CombineWithSecondParameterSingleValue)
-
TEST(CombineTest, CombineWithFirstParameterEmptyRange)
-
TEST(CombineTest, CombineWithSecondParameterEmptyRange)
-
TEST(CombineTest, CombineWithMaxNumberOfParameters)
-
TEST(CombineTest, NonDefaultConstructAssign)
-
TEST(ParamGeneratorTest, AssignmentWorks)
-
TEST_P(TestGenerationTest, TestsExpandedAndRun)
-
INSTANTIATE_TEST_SUITE_P(TestExpansionModule, TestGenerationTest, ValuesIn(test_generation_params))
-
TEST_P(GeneratorEvaluationTest, GeneratorsEvaluatedInMain)
-
INSTANTIATE_TEST_SUITE_P(GenEvalModule, GeneratorEvaluationTest, Values(GeneratorEvaluationTest::param_value()))
-
TEST_P(ExternalGeneratorTest, ExternalGenerator)
-
INSTANTIATE_TEST_SUITE_P(ExternalGeneratorModule, ExternalGeneratorTest, extern_gen)
-
TEST_P(ExternalInstantiationTest, IsMultipleOf33)
-
TEST_P(MultipleInstantiationTest, AllowsMultipleInstances)
-
INSTANTIATE_TEST_SUITE_P (Sequence1, MultipleInstantiationTest, Values(1, 2))
-
INSTANTIATE_TEST_SUITE_P (Sequence2, MultipleInstantiationTest, Range(3, 5))
-
TEST_P(InstantiationInMultipleTranslationUnitsTest, IsMultipleOf42)
-
INSTANTIATE_TEST_SUITE_P (Sequence1, InstantiationInMultipleTranslationUnitsTest, Values(42, 42 *2))
-
TEST_P(SeparateInstanceTest, TestsRunInSeparateInstances)
-
INSTANTIATE_TEST_SUITE_P (FourElemSequence, SeparateInstanceTest, Range(1, 4))
-
TEST_P(NamingTest, TestsReportCorrectNamesAndParameters)
-
INSTANTIATE_TEST_SUITE_P (ZeroToFiveSequence, NamingTest, Range(0, 5))
-
TEST_P(PREFIX_WITH_MACRO(NamingTest), PREFIX_WITH_FOO(SomeTestName))
-
INSTANTIATE_TEST_SUITE_P (FortyTwo, MacroNamingTest, Values(42))
-
TEST_F(PREFIX_WITH_MACRO(NamingTestNonParametrized), PREFIX_WITH_FOO(SomeTestName))
-
TEST(MacroNameing, LookupNames)
-
TEST_P(CustomFunctorNamingTest, CustomTestNames)
-
INSTANTIATE_TEST_SUITE_P (CustomParamNameFunctor, CustomFunctorNamingTest, Values(std::string("FunctorName")), CustomParamNameFunctor())
-
INSTANTIATE_TEST_SUITE_P (AllAllowedCharacters, CustomFunctorNamingTest, Values("abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "01234567890_"), CustomParamNameFunctor())
-
inline std::string
CustomParamNameFunction(const ::testing::TestParamInfo<std::string> &inf)
-
TEST_P(CustomFunctionNamingTest, CustomTestNames)
-
INSTANTIATE_TEST_SUITE_P (CustomParamNameFunction, CustomFunctionNamingTest, Values(std::string("FunctionName")), CustomParamNameFunction)
-
INSTANTIATE_TEST_SUITE_P (CustomParamNameFunctionP, CustomFunctionNamingTest, Values(std::string("FunctionNameP")), &CustomParamNameFunction)
-
TEST_P(CustomLambdaNamingTest, CustomTestNames)
-
INSTANTIATE_TEST_SUITE_P (CustomParamNameLambda, CustomLambdaNamingTest, Values(std::string("LambdaName")), [](const ::testing::TestParamInfo< std::string > &inf) { return inf.param;})
-
TEST(CustomNamingTest, CheckNameRegistry)
-
TEST_P(CustomIntegerNamingTest, TestsReportCorrectNames)
-
INSTANTIATE_TEST_SUITE_P (PrintToString, CustomIntegerNamingTest, Range(0, 5), ::testing::PrintToStringParamName())
-
std::ostream &
operator<<(std::ostream &stream, const CustomStruct &val)
-
TEST_P(CustomStructNamingTest, TestsReportCorrectNames)
-
INSTANTIATE_TEST_SUITE_P (PrintToString, CustomStructNamingTest, Values(CustomStruct(0), CustomStruct(1)), ::testing::PrintToStringParamName())
-
TEST_P(StatefulNamingTest, TestsReportCorrectNames)
-
INSTANTIATE_TEST_SUITE_P (StatefulNamingFunctor, StatefulNamingTest, Range(0, 5), StatefulNamingFunctor())
-
TEST_P(CommentTest, TestsCorrectlyReportUnstreamableParams)
-
INSTANTIATE_TEST_SUITE_P (InstantiationWithComments, CommentTest, Values(Unstreamable(1)))
-
TEST_F(NonParameterizedBaseTest, FixtureIsInitialized)
-
TEST_P(ParameterizedDerivedTest, SeesSequence)
-
TEST_F(ParameterizedDeathTest, GetParamDiesFromTestF)
-
INSTANTIATE_TEST_SUITE_P (RangeZeroToFive, ParameterizedDerivedTest, Range(0, 5))
-
TEST_P(MyEnumTest, ChecksParamMoreThanZero)
-
INSTANTIATE_TEST_SUITE_P (MyEnumTests, MyEnumTest, ::testing::Values(ENUM1, ENUM2, 0))
-
int
main(int argc, char **argv)
Variables
-
const int
test_generation_params[] = {36, 42, 72}
-
ParamGenerator<int>
extern_gen
-
-
file
googletest-param-test-test.h - #include “gtest/gtest.h”
-
file
googletest-param-test2-test.cc - #include “gtest/gtest.h”#include “test/googletest-param-test-test.h”
Functions
-
INSTANTIATE_TEST_SUITE_P (MultiplesOf33, ExternalInstantiationTest, Values(33, 66))
-
INSTANTIATE_TEST_SUITE_P (Sequence2, InstantiationInMultipleTranslationUnitsTest, Values(42 *3, 42 *4, 42 *5))
Variables
-
ParamGenerator<int>
extern_gen= Values(33)
-
-
file
googletest-port-test.cc - #include <stdio.h>#include “gtest/internal/gtest-port.h”#include <list>#include <memory>#include <utility>#include <vector>#include “gtest/gtest.h”#include “gtest/gtest-spi.h”#include “src/gtest-internal-inl.h”
-
file
googletest-printers-test.cc - #include <algorithm>#include <cctype>#include <cstdint>#include <cstring>#include <deque>#include <forward_list>#include <limits>#include <list>#include <map>#include <memory>#include <set>#include <sstream>#include <string>#include <unordered_map>#include <unordered_set>#include <utility>#include <vector>#include “gtest/gtest-printers.h”#include “gtest/gtest.h”
Defines
-
EXPECT_PRINT_TO_STRING_(value, expected_string)
Enums
-
enum
AnonymousEnum Values:
-
enumerator
kAE1
-
enumerator
kAE2
-
enumerator
-
enum
EnumWithoutPrinter Values:
-
enumerator
kEWP1
-
enumerator
kEWP2
-
enumerator
-
enum
EnumWithStreaming Values:
-
enumerator
kEWS1
-
enumerator
-
enum
EnumWithPrintTo Values:
-
enumerator
kEWPT1
-
enumerator
Functions
-
std::ostream &
operator<<(std::ostream &os, EnumWithStreaming e)
-
void
PrintTo(EnumWithPrintTo e, std::ostream *os)
-
static void
operator<<(std::ostream &os, const ParentClass&)
-
static void
operator<<(std::ostream &os, const ChildClassWithStreamOperator&)
-
inline void
operator<<(::std::ostream &os, const StreamableInGlobal&)
-
void
operator<<(::std::ostream &os, const StreamableInGlobal*)
-
-
file
googletest-setuptestsuite-test_.cc - #include “gtest/gtest.h”
-
file
googletest-shuffle-test_.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
googletest-test-part-test.cc - #include “gtest/gtest-test-part.h”#include “gtest/gtest.h”
-
file
googletest-throw-on-failure-test_.cc - #include “gtest/gtest.h”#include <stdio.h>#include <stdlib.h>#include <exception>
Functions
-
void
TerminateHandler()
-
int
main(int argc, char **argv)
-
void
-
file
googletest-uninitialized-test_.cc - #include “gtest/gtest.h”
Functions
-
TEST(DummyTest, Dummy)
-
int
main()
-
-
file
gtest-typed-test2_test.cc - #include <vector>#include “test/gtest-typed-test_test.h”#include “gtest/gtest.h”
Functions
-
INSTANTIATE_TYPED_TEST_SUITE_P(Vector, ContainerTest, testing::Types<std::vector<int>>)
-
-
file
gtest-typed-test_test.cc - #include “test/gtest-typed-test_test.h”#include <set>#include <type_traits>#include <vector>#include “gtest/gtest.h”
Typedefs
-
typedef Types<char, int>
TwoTypes
-
using
TypedTestSuitePStateDeathTest= TypedTestSuitePStateTest
-
typedef Types<short, long>
MyTwoTypes
-
using
IntAfterTypedTestSuiteP= int
-
using
IntBeforeRegisterTypedTestSuiteP= int
-
typedef Types<std::vector<double>, std::set<char>>
MyContainers
Functions
-
TYPED_TEST_SUITE(CommonTest, TwoTypes)
-
TYPED_TEST(CommonTest, ValuesAreCorrect)
-
TYPED_TEST(CommonTest, ValuesAreStillCorrect)
-
TYPED_TEST_SUITE(TypedTest1, int)
-
TYPED_TEST(TypedTest1, A)
-
TYPED_TEST_SUITE(TypedTest2, Types<int>)
-
TYPED_TEST(TypedTest2, A)
-
TYPED_TEST_SUITE(TypedTestWithNames, TwoTypes, TypedTestNames)
-
TYPED_TEST(TypedTestWithNames, TestSuiteName)
-
TEST_F(TypedTestSuitePStateTest, SucceedsForMatchingList)
-
TEST_F(TypedTestSuitePStateTest, IgnoresOrderAndSpaces)
-
TEST_F(TypedTestSuitePStateDeathTest, DetectsDuplicates)
-
TEST_F(TypedTestSuitePStateDeathTest, DetectsExtraTest)
-
TEST_F(TypedTestSuitePStateDeathTest, DetectsMissedTest)
-
TEST_F(TypedTestSuitePStateDeathTest, DetectsTestAfterRegistration)
-
TYPED_TEST_SUITE_P(DerivedTest)
-
TYPED_TEST_P(DerivedTest, ValuesAreCorrect)
-
TYPED_TEST_P(DerivedTest, ValuesAreStillCorrect)
-
REGISTER_TYPED_TEST_SUITE_P(DerivedTest, ValuesAreCorrect, ValuesAreStillCorrect)
-
INSTANTIATE_TYPED_TEST_SUITE_P(My, DerivedTest, MyTwoTypes)
-
TYPED_TEST_SUITE_P(TypeParametrizedTestWithNames)
-
TYPED_TEST_P(TypeParametrizedTestWithNames, TestSuiteName)
-
REGISTER_TYPED_TEST_SUITE_P(TypeParametrizedTestWithNames, TestSuiteName)
-
INSTANTIATE_TYPED_TEST_SUITE_P(CustomName, TypeParametrizedTestWithNames, TwoTypes, TypeParametrizedTestNames)
-
TYPED_TEST_SUITE_P(TypedTestP1)
-
TYPED_TEST_P(TypedTestP1, A)
-
TYPED_TEST_P(TypedTestP1, B)
-
REGISTER_TYPED_TEST_SUITE_P(TypedTestP1, A, B)
-
TYPED_TEST_SUITE_P(TypedTestP2)
-
TYPED_TEST_P(TypedTestP2, A)
-
REGISTER_TYPED_TEST_SUITE_P(TypedTestP2, A)
-
INSTANTIATE_TYPED_TEST_SUITE_P(Int, TypedTestP1, int)
-
INSTANTIATE_TYPED_TEST_SUITE_P(Int, TypedTestP2, Types<int>)
-
INSTANTIATE_TYPED_TEST_SUITE_P(Double, TypedTestP2, Types<double>)
-
INSTANTIATE_TYPED_TEST_SUITE_P(My, ContainerTest, MyContainers)
-
typedef Types<char, int>
-
file
gtest-typed-test_test.h - #include “gtest/gtest.h”
Functions
-
TYPED_TEST_SUITE_P(ContainerTest)
-
TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed)
-
TYPED_TEST_P(ContainerTest, InitialSizeIsZero)
-
REGISTER_TYPED_TEST_SUITE_P(ContainerTest, CanBeDefaultConstructed, InitialSizeIsZero)
-
-
file
gtest-unittest-api_test.cc - #include “gtest/gtest.h”#include <string.h>#include <algorithm>
Functions
-
int
main(int argc, char **argv)
-
int
-
file
gtest_all_test.cc - #include “test/googletest-filepath-test.cc”#include “test/googletest-message-test.cc”#include “test/googletest-options-test.cc”#include “test/googletest-port-test.cc”#include “test/googletest-test-part-test.cc”#include “test/gtest-typed-test2_test.cc”#include “test/gtest-typed-test_test.cc”#include “test/gtest_pred_impl_unittest.cc”#include “test/gtest_prod_test.cc”#include “test/gtest_skip_test.cc”#include “test/gtest_unittest.cc”#include “test/production.cc”
-
file
gtest_assert_by_exception_test.cc - #include “gtest/gtest.h”#include <stdlib.h>#include <stdio.h>#include <string.h>#include <stdexcept>
Functions
-
void
Fail(const char *msg)
-
static void
AssertFalse()
-
TEST(Test, Test)
-
TEST(Test, Test2)
-
int
main(int argc, char **argv)
Variables
-
int
kTestForContinuingTest= 0
-
void
-
file
gtest_environment_test.cc - #include <stdlib.h>#include <stdio.h>#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Enums
-
enum
FailureType Values:
Functions
-
int
main(int argc, char **argv)
-
enum
-
file
gtest_help_test_.cc - #include “gtest/gtest.h”
Functions
-
TEST(HelpFlagTest, ShouldNotBeRun)
-
-
file
gtest_list_output_unittest_.cc - #include “gtest/gtest.h”
Typedefs
-
typedef testing::Types<int, bool>
TypedTestTypes
-
typedef testing::Types<int, bool>
TypeParameterizedTestSuiteTypes
Functions
-
TEST(FooTest, Test1)
-
TEST(FooTest, Test2)
-
TEST_F(FooTestFixture, Test3)
-
TEST_F(FooTestFixture, Test4)
-
TEST_P(ValueParamTest, Test5)
-
TEST_P(ValueParamTest, Test6)
-
INSTANTIATE_TEST_SUITE_P (ValueParam, ValueParamTest, ::testing::Values(33, 42))
-
TYPED_TEST_SUITE(TypedTest, TypedTestTypes)
-
TYPED_TEST(TypedTest, Test7)
-
TYPED_TEST(TypedTest, Test8)
-
TYPED_TEST_SUITE_P(TypeParameterizedTestSuite)
-
TYPED_TEST_P(TypeParameterizedTestSuite, Test9)
-
TYPED_TEST_P(TypeParameterizedTestSuite, Test10)
-
REGISTER_TYPED_TEST_SUITE_P(TypeParameterizedTestSuite, Test9, Test10)
-
INSTANTIATE_TYPED_TEST_SUITE_P(Single, TypeParameterizedTestSuite, TypeParameterizedTestSuiteTypes)
-
int
main(int argc, char **argv)
-
typedef testing::Types<int, bool>
-
file
gtest_main_unittest.cc - #include “gtest/gtest.h”
-
file
gtest_no_test_unittest.cc - #include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
gtest_pred_impl_unittest.cc - #include <iostream>#include “gtest/gtest.h”#include “gtest/gtest-spi.h”
Typedefs
-
typedef Predicate1Test
EXPECT_PRED_FORMAT1Test
-
typedef Predicate1Test
ASSERT_PRED_FORMAT1Test
-
typedef Predicate1Test
EXPECT_PRED1Test
-
typedef Predicate1Test
ASSERT_PRED1Test
-
typedef Predicate2Test
EXPECT_PRED_FORMAT2Test
-
typedef Predicate2Test
ASSERT_PRED_FORMAT2Test
-
typedef Predicate2Test
EXPECT_PRED2Test
-
typedef Predicate2Test
ASSERT_PRED2Test
-
typedef Predicate3Test
EXPECT_PRED_FORMAT3Test
-
typedef Predicate3Test
ASSERT_PRED_FORMAT3Test
-
typedef Predicate3Test
EXPECT_PRED3Test
-
typedef Predicate3Test
ASSERT_PRED3Test
-
typedef Predicate4Test
EXPECT_PRED_FORMAT4Test
-
typedef Predicate4Test
ASSERT_PRED_FORMAT4Test
-
typedef Predicate4Test
EXPECT_PRED4Test
-
typedef Predicate4Test
ASSERT_PRED4Test
-
typedef Predicate5Test
EXPECT_PRED_FORMAT5Test
-
typedef Predicate5Test
ASSERT_PRED_FORMAT5Test
-
typedef Predicate5Test
EXPECT_PRED5Test
-
typedef Predicate5Test
ASSERT_PRED5Test
Functions
-
std::ostream &
operator<<(std::ostream &os, const Bool &x)
-
template<typename
T1>
boolPredFunction1(T1 v1)
-
bool
PredFunction1Int(int v1)
-
bool
PredFunction1Bool(Bool v1)
-
TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED1Test, FunctionOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED1Test, FunctionOnUserTypeFailure)
-
TEST_F(EXPECT_PRED1Test, FunctorOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED1Test, FunctorOnUserTypeFailure)
-
bool
PredFunction2Int(int v1, int v2)
-
template<typename
T1, typenameT2>
testing::AssertionResultPredFormatFunction2(const char *e1, const char *e2, const T1 &v1, const T2 &v2)
-
TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED2Test, FunctionOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED2Test, FunctionOnUserTypeFailure)
-
TEST_F(EXPECT_PRED2Test, FunctorOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED2Test, FunctorOnUserTypeFailure)
-
bool
PredFunction3Int(int v1, int v2, int v3)
-
template<typename
T1, typenameT2, typenameT3>
testing::AssertionResultPredFormatFunction3(const char *e1, const char *e2, const char *e3, const T1 &v1, const T2 &v2, const T3 &v3)
-
TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED3Test, FunctionOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED3Test, FunctionOnUserTypeFailure)
-
TEST_F(EXPECT_PRED3Test, FunctorOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED3Test, FunctorOnUserTypeFailure)
-
template<typename
T1, typenameT2, typenameT3, typenameT4>
boolPredFunction4(T1 v1, T2 v2, T3 v3, T4 v4)
-
bool
PredFunction4Int(int v1, int v2, int v3, int v4)
-
template<typename
T1, typenameT2, typenameT3, typenameT4>
testing::AssertionResultPredFormatFunction4(const char *e1, const char *e2, const char *e3, const char *e4, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
-
TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED4Test, FunctionOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED4Test, FunctionOnUserTypeFailure)
-
TEST_F(EXPECT_PRED4Test, FunctorOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED4Test, FunctorOnUserTypeFailure)
-
template<typename
T1, typenameT2, typenameT3, typenameT4, typenameT5>
boolPredFunction5(T1 v1, T2 v2, T3 v3, T4 v4, T5 v5)
-
bool
PredFunction5Int(int v1, int v2, int v3, int v4, int v5)
-
template<typename
T1, typenameT2, typenameT3, typenameT4, typenameT5>
testing::AssertionResultPredFormatFunction5(const char *e1, const char *e2, const char *e3, const char *e4, const char *e5, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
-
TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeSuccess)
-
TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeSuccess)
-
TEST_F(EXPECT_PRED5Test, FunctionOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED5Test, FunctionOnUserTypeFailure)
-
TEST_F(EXPECT_PRED5Test, FunctorOnBuiltInTypeFailure)
-
TEST_F(EXPECT_PRED5Test, FunctorOnUserTypeFailure)
-
typedef Predicate1Test
-
file
gtest_premature_exit_test.cc - #include <stdio.h>#include “gtest/gtest.h”
Functions
-
int
main(int argc, char **argv)
-
int
-
file
gtest_prod_test.cc - #include “production.h”#include “gtest/gtest.h”
Functions
-
TEST(PrivateCodeTest, CanAccessPrivateMembers)
-
TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers)
-
-
file
gtest_repeat_test.cc - #include <stdlib.h>#include <iostream>#include “gtest/gtest.h”#include “src/gtest-internal-inl.h”
Defines
-
GTEST_CHECK_INT_EQ_(expected, actual)
Functions
-
int
main(int argc, char **argv)
-
-
file
gtest_skip_in_environment_setup_test.cc - #include <iostream>#include “gtest/gtest.h”
Functions
-
TEST(Test, AlwaysFails)
-
int
main(int argc, char **argv)
-
-
file
gtest_skip_test.cc - #include “gtest/gtest.h”
-
file
gtest_sole_header_test.cc - #include “gtest/gtest.h”
-
file
gtest_stress_test.cc - #include “gtest/gtest.h”#include <vector>#include “src/gtest-internal-inl.h”
Functions
-
TEST(StressTest, DISABLED_ThreadSafetyTestsAreSkippedWhenGoogleTestIsNotThreadSafe)
-
int
main(int argc, char **argv)
-
-
file
gtest_test_macro_stack_footprint_test.cc - #include “gtest/gtest.h”
Defines
-
TEN_TESTS_(test_case_name)
-
HUNDRED_TESTS_(test_case_name_prefix)
-
THOUSAND_TESTS_(test_case_name_prefix)
Functions
-
int
main(int argc, char **argv)
-
-
file
gtest_testbridge_test_.cc - #include “gtest/gtest.h”
Functions
-
TEST(TestFilterTest, TestThatSucceeds)
-
TEST(TestFilterTest, TestThatFails)
-
-
file
gtest_throw_on_failure_ex_test.cc - #include “gtest/gtest.h”#include <stdlib.h>#include <stdio.h>#include <string.h>#include <stdexcept>
Functions
-
void
Fail(const char *msg)
-
void
TestFailureThrowsRuntimeError()
-
int
main(int argc, char **argv)
-
void
-
file
gtest_unittest.cc - #include “gtest/gtest.h”#include <limits.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <cstdint>#include <map>#include <ostream>#include <string>#include <type_traits>#include <unordered_set>#include <vector>#include “gtest/gtest-spi.h”#include “src/gtest-internal-inl.h”
Defines
-
GTEST_USE_UNPROTECTED_COMMA_
-
VERIFY_CODE_LOCATION
-
GTEST_TEST_PARSING_FLAGS_(argv1, argv2, expected, should_print_help)
-
GTEST_FLAT_TUPLE_INT8
-
GTEST_FLAT_TUPLE_INT16
-
GTEST_FLAT_TUPLE_INT32
-
GTEST_FLAT_TUPLE_INT64
-
GTEST_FLAT_TUPLE_INT128
-
GTEST_FLAT_TUPLE_INT256
Typedefs
-
typedef int
IntAlias
Enums
-
enum
NamedEnum Values:
-
enum [anonymous]
Values:
Functions
-
TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded)
-
::std::ostream &
operator<<(::std::ostream &os, const TestingVector &vector)
-
TEST(AssertionResultTest, CopyConstructorWorksWhenNotOptimied)
-
TEST(AssertionResultTest, ConstructionWorks)
-
TEST(AssertionResultTest, NegationWorks)
-
TEST(AssertionResultTest, StreamingWorks)
-
TEST(AssertionResultTest, CanStreamOstreamManipulators)
-
TEST(AssertionResultTest, ConstructibleFromContextuallyConvertibleToBool)
-
TEST(AssertionResultTest, ConstructibleFromImplicitlyConvertible)
-
std::ostream &
operator<<(std::ostream &os, const Base &val)
-
std::ostream &
operator<<(std::ostream &os, const Base *pointer)
-
TEST(MessageTest, CanStreamUserTypeInGlobalNameSpace)
-
TEST(MessageTest, CanStreamUserTypeInUnnamedNameSpace)
-
TEST(MessageTest, CanStreamUserTypeInUserNameSpace)
-
std::ostream &
operator<<(std::ostream &os, const namespace2::MyTypeInNameSpace2 &val)
-
std::ostream &
operator<<(std::ostream &os, const namespace2::MyTypeInNameSpace2 *pointer)
-
TEST(MessageTest, CanStreamUserTypeInUserNameSpaceWithStreamOperatorInGlobal)
-
TEST(MessageTest, NullPointers)
-
TEST(MessageTest, WideStrings)
-
TEST(StreamingAssertionsTest, Unconditional)
-
TEST(StreamingAssertionsTest, Truth)
-
TEST(StreamingAssertionsTest, Truth2)
-
TEST(StreamingAssertionsTest, IntegerEquals)
-
TEST(StreamingAssertionsTest, IntegerLessThan)
-
TEST(StreamingAssertionsTest, StringsEqual)
-
TEST(StreamingAssertionsTest, StringsNotEqual)
-
TEST(StreamingAssertionsTest, StringsEqualIgnoringCase)
-
TEST(StreamingAssertionsTest, StringNotEqualIgnoringCase)
-
TEST(StreamingAssertionsTest, FloatingPointEquals)
-
TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsYes)
-
TEST(ColoredOutputTest, UsesColorsWhenGTestColorFlagIsAliasOfYes)
-
TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsNo)
-
TEST(ColoredOutputTest, UsesNoColorWhenGTestColorFlagIsInvalid)
-
TEST(ColoredOutputTest, UsesColorsWhenStdoutIsTty)
-
TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors)
-
TEST(StaticAssertTypeEqTest, WorksInClass)
-
TEST(StaticAssertTypeEqTest, CompilesForEqualTypes)
-
TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsNoFailure)
-
static void
FailFatally()
-
TEST(HasNonfatalFailureTest, ReturnsFalseWhenThereIsOnlyFatalFailure)
-
TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereIsNonfatalFailure)
-
TEST(HasNonfatalFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures)
-
static bool
HasNonfatalFailureHelper()
-
TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody)
-
TEST(HasNonfatalFailureTest, WorksOutsideOfTestBody2)
-
TEST(HasFailureTest, ReturnsFalseWhenThereIsNoFailure)
-
TEST(HasFailureTest, ReturnsTrueWhenThereIsFatalFailure)
-
TEST(HasFailureTest, ReturnsTrueWhenThereIsNonfatalFailure)
-
TEST(HasFailureTest, ReturnsTrueWhenThereAreFatalAndNonfatalFailures)
-
static bool
HasFailureHelper()
-
TEST(HasFailureTest, WorksOutsideOfTestBody)
-
TEST(HasFailureTest, WorksOutsideOfTestBody2)
-
TEST(TestEventListenersTest, ConstructionWorks)
-
TEST(TestEventListenersTest, DestructionWorks)
-
TEST(TestEventListenersTest, Append)
-
TEST(EventListenerTest, AppendKeepsOrder)
-
TEST(TestEventListenersTest, Release)
-
TEST(EventListenerTest, SuppressEventForwarding)
-
TEST(EventListenerDeathTest, EventsNotForwardedInDeathTestSubprecesses)
-
TEST(EventListenerTest, default_result_printer)
-
TEST(EventListenerTest, RemovingDefaultResultPrinterWorks)
-
TEST(EventListenerTest, default_xml_generator)
-
TEST(EventListenerTest, RemovingDefaultXmlGeneratorWorks)
-
GTEST_TEST(AlternativeNameTest, Works)
-
TEST(HasDebugStringAndShortDebugStringTest, ValueIsCompileTimeConstant)
-
TEST(HasDebugStringAndShortDebugStringTest, ValueIsTrueWhenTypeHasDebugStringAndShortDebugString)
-
TEST(HasDebugStringAndShortDebugStringTest, ValueIsFalseWhenTypeIsNotAProtocolMessage)
-
template<typename
T1, typenameT2>
voidTestGTestRemoveReferenceAndConst()
-
TEST(RemoveReferenceToConstTest, Works)
-
template<typename
T1, typenameT2>
voidTestGTestReferenceToConst()
-
TEST(GTestReferenceToConstTest, Works)
-
TEST(IsContainerTestTest, WorksForNonContainer)
-
TEST(IsContainerTestTest, WorksForContainer)
-
TEST(IsContainerTestTest, ConstOnlyContainer)
-
TEST(IsHashTable, Basic)
-
TEST(ArrayEqTest, WorksForDegeneratedArrays)
-
TEST(ArrayEqTest, WorksForOneDimensionalArrays)
-
TEST(ArrayEqTest, WorksForTwoDimensionalArrays)
-
TEST(ArrayAwareFindTest, WorksForOneDimensionalArray)
-
TEST(ArrayAwareFindTest, WorksForTwoDimensionalArray)
-
TEST(CopyArrayTest, WorksForDegeneratedArrays)
-
TEST(CopyArrayTest, WorksForOneDimensionalArrays)
-
TEST(CopyArrayTest, WorksForTwoDimensionalArrays)
-
TEST(NativeArrayTest, ConstructorFromArrayWorks)
-
TEST(NativeArrayTest, CreatesAndDeletesCopyOfArrayWhenAskedTo)
-
TEST(NativeArrayTest, TypeMembersAreCorrect)
-
TEST(NativeArrayTest, MethodsWork)
-
TEST(NativeArrayTest, WorksForTwoDimensionalArray)
-
TEST(IndexSequence, MakeIndexSequence)
-
TEST(ElemFromList, Basic)
-
TEST(FlatTuple, Basic)
-
TEST(FlatTuple, Apply)
-
TEST(FlatTuple, ConstructorCalls)
-
TEST(FlatTuple, ManyTypes)
-
TEST(SkipPrefixTest, SkipsWhenPrefixMatches)
-
TEST(SkipPrefixTest, DoesNotSkipWhenPrefixDoesNotMatch)
-
TEST(AdHocTestResultTest, AdHocTestResultForUnitTestDoesNotShowFailure)
-
TEST(RegisterTest, WasRegistered)
Variables
-
static bool dummy1 GTEST_ATTRIBUTE_UNUSED_ = StaticAssertTypeEq<bool, bool>()
-
auto *
dynamic_test= testing::RegisterTest("DynamicUnitTestFixture", "DynamicTest", "TYPE", "VALUE", __FILE__,__LINE__, []() ->DynamicUnitTestFixture* { return new DynamicTest; })
-
-
file
gtest_xml_outfile1_test_.cc - #include “gtest/gtest.h”
Functions
-
TEST_F(PropertyOne, TestSomeProperties)
-
-
file
gtest_xml_outfile2_test_.cc - #include “gtest/gtest.h”
Functions
-
TEST_F(PropertyTwo, TestSomeProperties)
-
-
file
gtest_xml_output_unittest_.cc - #include “gtest/gtest.h”
Typedefs
-
typedef testing::Types<int, long>
TypedTestTypes
-
typedef testing::Types<int, long>
TypeParameterizedTestSuiteTypes
Functions
-
TEST_F(SuccessfulTest, Succeeds)
-
TEST_F(FailedTest, Fails)
-
TEST_F(DisabledTest, DISABLED_test_not_run)
-
TEST_F(SkippedTest, Skipped)
-
TEST_F(SkippedTest, SkippedWithMessage)
-
TEST_F(SkippedTest, SkippedAfterFailure)
-
TEST(MixedResultTest, Succeeds)
-
TEST(MixedResultTest, Fails)
-
TEST(MixedResultTest, DISABLED_test)
-
TEST(XmlQuotingTest, OutputsCData)
-
TEST(InvalidCharactersTest, InvalidCharactersInMessage)
-
TEST_F(PropertyRecordingTest, OneProperty)
-
TEST_F(PropertyRecordingTest, IntValuedProperty)
-
TEST_F(PropertyRecordingTest, ThreeProperties)
-
TEST_F(PropertyRecordingTest, TwoValuesForOneKeyUsesLastValue)
-
TEST(NoFixtureTest, RecordProperty)
-
void
ExternalUtilityThatCallsRecordProperty(const std::string &key, int value)
-
void
ExternalUtilityThatCallsRecordProperty(const std::string &key, const std::string &value)
-
TEST(NoFixtureTest, ExternalUtilityThatCallsRecordIntValuedProperty)
-
TEST(NoFixtureTest, ExternalUtilityThatCallsRecordStringValuedProperty)
-
TEST_P(ValueParamTest, HasValueParamAttribute)
-
TEST_P(ValueParamTest, AnotherTestThatHasValueParamAttribute)
-
INSTANTIATE_TEST_SUITE_P (Single, ValueParamTest, Values(33, 42))
-
TYPED_TEST_SUITE(TypedTest, TypedTestTypes)
-
TYPED_TEST(TypedTest, HasTypeParamAttribute)
-
TYPED_TEST_SUITE_P(TypeParameterizedTestSuite)
-
TYPED_TEST_P(TypeParameterizedTestSuite, HasTypeParamAttribute)
-
REGISTER_TYPED_TEST_SUITE_P(TypeParameterizedTestSuite, HasTypeParamAttribute)
-
INSTANTIATE_TYPED_TEST_SUITE_P(Single, TypeParameterizedTestSuite, TypeParameterizedTestSuiteTypes)
-
int
main(int argc, char **argv)
-
typedef testing::Types<int, long>
-
file
production.cc - #include “production.h”
-
file
production.h - #include “gtest/gtest_prod.h”
-
file
default_configuration.hpp - #include “package_template/gains_configuration.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
Defines
-
DEFAULT_KP
-
DEFAULT_KD
-
DEFAULT_KI
-
file
file_configuration.hpp - #include “package_template/gains_configuration.hpp”#include “yaml-cpp/yaml.h”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
gains_configuration.hpp - #include <iostream>#include <string>
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
pid.hpp - #include <memory>#include <vector>#include “package_template/default_configuration.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
rosparameters_configuration.hpp - #include “package_template_cpp/gains_configuration.hpp”#include “ros/master.h”#include “ros/ros.h”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
Defines
-
ROSPARAM_KP
-
ROSPARAM_KD
-
ROSPARAM_KI
-
file
basic_pid.cpp - #include “package_template/basic_pid.hpp”
- Author
Vincent Berenz license License BSD-3-Clause
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft.
- Date
2019-05-22
-
file
default_configuration.cpp - #include “package_template/default_configuration.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
file_configuration.cpp - #include “package_template/file_configuration.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
gains_configuration.cpp - #include “package_template/gains_configuration.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
pid.cpp - #include “package_template/pid.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
rosparameters_configuration.cpp - #include “package_template/rosparameters_configuration.hpp”
- Author
Vincent Berenz
- Copyright
Copyright (c) 2019, New York University and Max Planck Gesellschaft, License BSD-3-Clause
- Date
2019-12-09
-
file
wrappers.cpp - #include <pybind11/pybind11.h>#include “package_template/pid.hpp”
Functions
-
PYBIND11_MODULE(package_template_cpp_bindings, m)
-
-
group
python_builtins Unless stated otherwise, the following C++ functions behave the same as their Python counterparts.
-
group
annotations
-
group
pytypes
-
dir
demos
-
dir
devel/workspace/install/pybind11/include/pybind11/detail
-
dir
devel/workspace/src/pybind11/include/pybind11/detail
-
dir
devel
-
dir
devel/workspace/install/googletest-distribution/include/gmock
-
dir
devel/workspace/src/googletest/googlemock/include/gmock
-
dir
devel/workspace/src/googletest/googlemock
-
dir
devel/workspace/src/googletest
-
dir
devel/workspace/src/googletest/googletest
-
dir
devel/workspace/install/googletest-distribution
-
dir
devel/workspace/src/googletest/googletest/include/gtest
-
dir
devel/workspace/install/googletest-distribution/include/gtest
-
dir
devel/workspace/install/pybind11/include
-
dir
include
-
dir
devel/workspace/src/pybind11/include
-
dir
devel/workspace/src/googletest/googlemock/include
-
dir
devel/workspace/install/yaml_utils/include
-
dir
devel/workspace/install/googletest-distribution/include
-
dir
devel/workspace/src/yaml_utils/include
-
dir
devel/workspace/src/googletest/googletest/include
-
dir
devel/workspace/install
-
dir
include/package_template
-
dir
devel/workspace/install/pybind11
-
dir
devel/workspace/install/pybind11/include/pybind11
-
dir
devel/workspace/src/pybind11
-
dir
devel/workspace/src/pybind11/include/pybind11
-
dir
devel/workspace/src/googletest/googletest/samples
-
dir
devel/workspace/src/googletest/googletest/src
-
dir
devel/workspace/src/googletest/googlemock/src
-
dir
devel/workspace/src
-
dir
src
-
dir
srcpy
-
dir
devel/workspace/src/googletest/googletest/test
-
dir
devel/workspace/src/googletest/googlemock/test
-
dir
devel/workspace
-
dir
devel/workspace/install/yaml_utils
-
dir
devel/workspace/install/yaml_utils/include/yaml_utils
-
dir
devel/workspace/src/yaml_utils
-
dir
devel/workspace/src/yaml_utils/include/yaml_utils
-
example
demo_pid.cpp Create the default PID controller and compute the control once. This illustrates in the simplest way the use of the PID class API.
#include "package_template/pid.hpp" void run_demo() { // PID controller with default gains values package_template::PID& controller = package_template::get_default_pid(); // example of force computation double current_position = 1; double current_velocity = 1; double delta_time = 0.01; double target_position = 2; double force = controller.compute( current_position, current_velocity, target_position, delta_time); std::cout << "computed force: " << force << std::endl; // resetting integral of the controller // (useless here because we do not reuse it) controller.reset_integral(); } int main() { try { run_demo(); } catch (const std::exception& e) { std::cout << "demo failed !\nerror message:\n" << e.what() << std::endl; return 1; // informs continuous integration that this demo did not run // successfully } return 0; // informs continuous integration that this demo did run // successfully }
-
example
demo_pid_load_from_file.cpp Load the PID gains from a yaml file and create a PID controller from them.This illustrates how to safely use the API when yaml file parsing is wanted.
#include <stdexcept> #include "package_template/file_configuration.hpp" #include "package_template/pid.hpp" void run_demo() { /* displaying what this demo is about */ std::cout << "This demo shows how to create an executable run by the " "continuous integration\n" << "which depends on a configuration file. In the solution " "showed here, the absolute path\n" << "to the configuration file is set during pre-compilation. See " "code in /demos/demo_pid_load_from_file.cpp\n" << "for details\n\n"; /* reading gains (kp,kd,ki) from yaml config */ // (look at the CMakeLists.txt to see why TEST_PID_GAINS_YAML_FILE_PATH is // replaced by correct abs path during compilation) std::string config_file_path = TEST_PID_GAINS_YAML_FILE_PATH; // Gains_configuration is the base class for all configuration, including // the one read from yaml file, as done here. package_template::File_configuration gains = package_template::File_configuration(config_file_path); // printing to standard output the gains std::cout << "gains read from configuration file:" << std::endl; package_template::print_configuration(gains); // checking reading the config file when fine // if not, throwing corresponding error if (gains.has_error()) { throw std::runtime_error(gains.get_error()); } /* creating and running the controller */ // PID controller creation package_template::PID controller(gains); // example of force computation double current_position = 1; double current_velocity = 1; double delta_time = 0.01; double target_position = 2; double force = controller.compute( current_position, current_velocity, target_position, delta_time); std::cout << "computed force: " << force << std::endl; // resetting integral of the controller controller.reset_integral(); } int main() { try { run_demo(); } catch (const std::runtime_error& e) { std::cout << "demo failed !\nerror message:\n" << e.what() << std::endl; return 1; // informs continuous integration that this demo did not run // successfully } return 0; // informs continuous integration that this demo did run // successfully }